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...
sririshi.hashnode.dev1 min read
Ruchi Goswami
Junior Web Developer
Good examples :)