JavaScript Tutorial

Nullish Coalescing Operator

Returns the right-hand operand when the left-side value is null or undefined.

const value = null ?? 'default'; // 'default'
const other = 0 ?? 'default'; // 0 (doesn't trigger for falsy values)