Nullish Coalescing Operator (??)
Nullish coalescing operator is a logical operator. It returns right hand operand only if left hand operand is null or undefined.
Syntax
leftOperand ?? rightOperand
Examples:
const user = null ?? "user";
console.log(user);
/* output: user */
const...
·1 min read·sririshi.hashnode.devRead the article
Ruchi Goswami
Good examples :)