Nullish Coalescing
This lesson explains the new nullish coalescing operator.
We'll cover the following...
We'll cover the following...
Nullish coalescing for an object
TypeScript 3.7 brought the nullish coalescing operator: ??. On the left side of the operator is a variable or condition. On the right side is the result if the condition is null or undefined.
One use case for this operator is to check if a variable is set to define ...