a statement that evaluates to a value.
JS ⟩ statement ⟩ expression
(statement) A fragment of code that produces a value.
operator
primary expression
object literal / array literal
function expression
invocation expression:f() - calls a function.
left-hand side expression
property access expression
two types of expressions
those that have side effects (such as assigning values)
those that purely evaluate.
you can use an expression to refer to an object's property.
👉 bracket notation []
(2020) JavaScript The Definitive Guide, 1.3 A Tour of JavaScript
JavaScript: The Definitive Guide ⟩
1.3 A Tour of JavaScript
Ch. 4:Expressions & Operators
Expressions versus statements in JavaScript ⭐️
Javascript 的表達式 (Expressions) 和陳述式 (Statements):一個用說的,一個用做的
Expressions and operators
Last updated 1 year ago