Learn Coding Basics in Hours with JavaScript by Gross Erik & Stanley Jack & Academy The

Learn Coding Basics in Hours with JavaScript by Gross Erik & Stanley Jack & Academy The

Author:Gross, Erik & Stanley, Jack & Academy, The [Gross, Erik]
Language: eng
Format: epub
Published: 2020-06-04T16:00:00+00:00


END OF SECTION CHALLENGE

​ Write a program that includes the following:

● Assign several variables and display one utilizing the document.write() method,

● Create a string, concatenate a string and change the font color.

SECTION SEVEN

EXPRESSIONS AND STATEMENTS

Expressions are numbers, symbols, and operators grouped together that show the amount of something. An expression is a written math problem.

In computers, an expression is a combination of values that are computed by the computer. There are different ways to write out expressions, depending on which language you are programming in.

EXAMPLE: Name = “What person types in the name box" could be an expression. Also, x + 5 is an expression.

​ Statements are computer instructions. These are the instructions that are used by people as they create computer programs. The simplest of these might be things like "print," "delete," "add," "multiply," etc.

EXAMPLE: The "print" statement tells your computer to print whatever text you typed as part of the command.

In JavaScript, expressions and statements are different things. An expression results in a value, while a statement performs a task—a program is basically a series of statements. There are basically two types of expressions: ones that have a value (or result in a value) and ones that assign a value to a variable.

The following JavaScript code would be an expression:

3 + 3

​ Consider the following:

Document.write(3 + 3);

​ That is a statement. 3 + 3 is also an expression. As a note, semicolons separate statements.

END OF SECTION CHALLENGE

● Write an expression

● Write a statement

● Write a statement that contains an expression

Note: Ensure the above statements and expressions display a result.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.