📦property access expression
use . / [] / ?. / ?.[] to evaluate object property / array element.
JS ⟩ statement ⟩ expression ⟩ operator ⟩ left-hand side ⟩ property access ⟩ expression
(operator)
use .
, []
, ?.
, ?.[]
, ?.()
to evaluate the value of object property / array element.
// ⭐️ (normal) chaining
obj . identifier // dot notation
obj [ expr ] // bracket notation (no "dot"❗️)
// ⭐️ optional chaining
obj ?. prop // dot notation
obj ?. [ expr ] // bracket notation
func ?. ( args ) // optional invocation
🈯 synonyms: "property accessor", "property access expression", "chaining"
Last updated
Was this helpful?