DEV Community

Discussion on: How to use the nullish coalescing operator (??) in Javascript

Collapse
 
eljayadobe profile image
Eljay-Adobe

Two more falsy values, -0 (I know, that's a technicality), and in HTML the object document.all.

And just for sake of completeness, new Boolean(false) object is truthy, as are all objects except for document.all.

Collapse
 
arikaturika profile image
Arika O

Thank you for the remark, I will edit in a bit. To be honest, I never used document.all in a boolean context :).