Nullish Coalescing

The ?? operator, which uses a fallback only when its left value is null or undefined.

What is Nullish Coalescing in JavaScript?

Nullish Coalescing — The ?? operator, which uses a fallback only when its left value is null or undefined.

const nickname = null;
const displayName = nickname ?? "Guest";

Level: Apprentice · More JavaScript terms at this level

Updated