Skip to content

Instantly share code, notes, and snippets.

@grownseed
Created March 29, 2013 23:13
Show Gist options
  • Save grownseed/5274302 to your computer and use it in GitHub Desktop.
Save grownseed/5274302 to your computer and use it in GitHub Desktop.
{} + [] >>> 0
parseInt({} + []) >>> NaN
!{} > ~{} >>> true
~[] >>> -1
{} + 0 + [] >>> "0"
0 + {} + [] >>> "0[object Object]"
{} + [] + 0 >>> 0
typeof null === 'object' && null !== undefined && null == undefined >>> true
@BrentNoorda
Copy link

x = new Boolean(false); x == !x; >>> true

@grownseed
Copy link
Author

@bencevans I saw that talk, forgot about it, thanks for reminding me, lots of fun :)
@BrentNoorda pretty cool! Also the reason why I never use the Boolean constructor ^^

Keep them coming, I find that stuff really amusing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment