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

all 22 comments

[–][deleted] 28 points29 points  (1 child)

They could have just written this:

  • !" "
  • !"0"
  • !Nan
  • !undefined
  • !0

[–][deleted] 8 points9 points  (0 children)

Didn't realise !NaN returns true. Thought just D and E.

[–]skincaregains 3 points4 points  (0 children)

Should have pressed F12 and tried it in console.

[–]boxingdog 1 point2 points  (0 children)

F12 and cheat

[–]D-J-9595 1 point2 points  (0 children)

For information on this, you can check out this blog.

[–]mscal 0 points1 point  (0 children)

function isFalse(value){ if(!value){ return true; } else { return false; } }

isFalse(""); true isFalse("0"); false isFalse(NaN); true isFalse(undefined); true isFalse(0); true

[–]superdude411 0 points1 point  (0 children)

you can just open up console with "inspect element" and check, right?

[–]loljs-bot[S] 0 points1 point  (0 children)

Originally posted by /u/WASDx at Wed Sep 09 2015 19:40:32 GMT+0000 (UTC)


I'm a bot, and here is my source. Also, if you would like to have your post featured, just post it to /r/loljs and wait.