📜  表达式 vs 语句 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:05.806000             🧑  作者: Mango

代码示例1
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.