DEV Community

Discussion on: Javascript ||, aka Why Doesn't This Work?!

Collapse
 
laurieontech profile image
Laurie

Ah, but it doesn't return a boolean. It returns the value. So yes, the operation logic is reasonable, but the return structure breaks the concept. It's no longer commutative at that point.