?., ?? and **

Optional Chaining, Nullish Coalescing and Exponentiation

a?.b, a?.[k] and f?.() (ES2020) yield undefined instead of throwing when the left side is null or undefined, skipping the rest of the chain. a ?? b (ES2020) falls back only on nullish values, unlike ||. x ** y (ES2016) replaces Math.pow() and works on BigInts.

Safe access, nullish defaults and powersJavaScriptLive
const order = { customer: { name: "Ada" }, items: null, discount: 0 };
console.log(order.customer?.address?.city, order.items?.length, order.notify?.("sent"));
console.log(order.discount || 10, order.discount ?? 10, (order.items ?? []).length);
console.log(2 ** 10, (-2) ** 3, 2 ** -1, 10n ** 20n);

Three forms are SyntaxErrors: -2 ** 2 (write (-2) ** 2), a ?? b || c (parenthesize one side) and obj?.prop = 1. Wrapping a chain in parentheses ends the short-circuit, so (null?.a).b throws TypeError.