JS Daily #5 - Boolean Value With Nullish Coalescing Operator
What is the output of following code?
const a = false; const result = a ?? "Hello"; console.log(result);
The nullish coalescing operator (
??) is a logical operator that returns its right-hand side operand when its left-hand side operand is
undefined, and otherwise returns its left-hand side operand.
Default tendency is to return
?? is explicitly built for