Answers for "expression vs statement javascript"

2

expression vs statement javascript

An expression is any valid unit of code that resolves to a value.
An statement is any valid unit of code that resolves to an instruction.

Wherever JavaScript expects a statement, you can also write an expression.
The reverse does not hold.
Posted by: Guest on April-26-2021
-1

javascript expression

// EXPRESSION: Code that produces a value
// example(s):
3 + 4
1991
true && false && false

// STATEMENT: Code that performs actions (generally something that ends in ";"
// example:
const str = `String assigned to str`;
Posted by: Guest on December-08-2020

Code answers related to "expression vs statement javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language