javascript statements code example
Example 1: using if statements in javascript
if (expression) {
Statement(s) to be executed if expression is true
} else {
Statement(s) to be executed if expression is false
}
Example 2: javascript statement
// STATEMENT: Code that performs actions (generally something that ends in ";"
// example:
const str = `String assigned to str`;
// EXPRESSION: Code that produces a value
// example(s):
3 + 4
1991
true && false && false
Example 3: statement javascript
JavaScript statements are composed of Expressions.
All expressions are statements composed of Expressions.
A statement is a bunch of statments but
statements are not a bunch of statements.
Some statements are not really statements.