loading...

re: Logical assignment operators in JavaScript VIEW POST

FULL DISCUSSION
 

Imho, it would be important to emphasise on ??= checking for null and undefined, while ||= checking for falsy values. Could save some bugs :D

Same as:
0 || 42 // 42
0 && 42 // 0
0 ?? 42 // 0

 
Code of Conduct Report abuse