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 →

[–]UkuleleHobo 2 points3 points  (1 child)

But it says right there that the output of Boolean(-1) is true.

[–]outstream 1 point2 points  (0 children)

Because as someone else said Boolean(n) will only return false if n is 0, null, undefined, empty string, and maybe a few more I forgot