Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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.
 
PREVIOUS NEXT
Tagged: #expression #statement #javascript
ADD COMMENT
Topic
Name
1+3 =