Answers for "Logical Assignment Operator null coalescing"

0

Logical Assignment Operator null coalescing

const a = null;
const b = 3;
a ??= b;
console.log(a); // returns 3
// the above statement is equivalent to
if (a === null || a === undefined) {
  a = b;
}
Posted by: Guest on January-17-2022

Code answers related to "Logical Assignment Operator null coalescing"

Browse Popular Code Answers by Language