New ES Edition
Optional Chaining Operator
Instead of causing an error if a reference is nullish (null
or undefined
), the expression short-circuits with a return value of undefined
Nullish Coalescing Operator
a logical operator that returns its right-hand side operand when its left-hand side operand is null
or undefined
, and otherwise returns its left-hand side operand. This can be contrasted with the logical OR (||
) operator, which returns the right-hand side operand if the left operand is any falsy value, not only null
or undefined
.
Globalthis
type:module
Last updated