- 表达式返回的是值,可以直接打印出来;
5 + 5 // => 10
lastCharacter("input") // => "t"
true === true // => true
- 语句是执行的某种操作
let x = 0
function declaration() {}
if (true) {
}
- Expression statement: produces a value and performs an action
// Assign `x` as the absolute value of `y`.
var x = y >= 0 ? y : -y