DEV Community

Discussion on: Considering `??` vs `||`

Collapse
 
lexlohr profile image
Alex Lohr

I wouldn't go so far to call them sins, but I agree that you can easily be careless in this language. JavaScript is not the only weak typed language, though (take Lua or Python for example). Also, || still has its merits where you consciously want to catch all falsy values.