Skip to content

Instantly share code, notes, and snippets.

@kumavis
Last active December 17, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumavis/5600958 to your computer and use it in GitHub Desktop.
Save kumavis/5600958 to your computer and use it in GitHub Desktop.
More strange javascript behaviour

comparators

null < 1
//=> true
null < 0
//=> false
undefined < 1
//=> false
undefined < 0
//=> false
undefined < null
//=> false
undefined > null
//=> false
undefined == null
//=> true
undefined === null
//=> false

uh...

!+[]
//=> true
+!+[]
//=> 1
+true
//=> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment