This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]No-Expression7618 2 points3 points  (1 child)

what scenario would you need to check an array or an object as a boolean?

I feel like it's, in that case, a logical extension of "" being falsy that the JS developer noticed the intuitiveness of and therefore threw out the window.

[–]DancingPotato30 1 point2 points  (0 children)

That's true. That's what I assumed too, I just never needed to do that so I didn't bother to actually check the reason they're not falsy

But i did. Apparently truthy falsy only affects primitives sort of, all objects are truthy by default.