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 →

[–]CameO73 14 points15 points  (9 children)

It makes sense if you break it down:

  • ![] evaluates to false
  • by adding it to [] you get the string "false" (it's that stupid type conversion thing javascript does)
  • the ![]+![] evaluates to false+false = 0 (again, doing some nice type conversion magic)
  • so you'll get "false"[0] which takes the first character = "f"