The nullish coalescing operator is a logical operator similar to the logical OR operator. The operator will return what is on it's right hand side when the left hand side is nullish, (null or undefined).
Syntax
const output = leftExpr ?? rightExpr;
Example
Support
Current support is all major browsers except IE.
Top comments (0)