1//Similar to || but only returns the right-hand operand if the left-hand is null or undefined
20 ?? "other" // 0
3false ?? "other" // false
4null ?? "other" // "other"
5undefined ?? "other" // "other"
1let a = null;
2const b = a ?? -1; // Same as b = ( a != null ? a : -1 );
3console.log(b); // output: -1
4//OR IF
5let a = 9;
6const b = a ?? -1;
7console.log(b); // output: 9
8
9//PS.,VERY CLOSE TO '||' OPERATION IN FUNCTION, BY NOT THE SAME