Skip to content

Instantly share code, notes, and snippets.

@JacksonGariety
Forked from rjfranco/wierd.js
Last active December 24, 2015 00:29
Show Gist options
  • Save JacksonGariety/6717554 to your computer and use it in GitHub Desktop.
Save JacksonGariety/6717554 to your computer and use it in GitHub Desktop.
[] + []
// returns an empty string, ''
[] + [0]
// returns a string, '0'
[0] + [0]
// returns a string, '00'
[0,0] + [0]
// returns a string, '00,0'
[] + {}
// returns either a string of '[obejct Object]', or [object Object]
{} + []
// returns 0
{} + {}
// returns NaN ( Not a number. )
0|1.5
// returns 1 (1.5 rounded down)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment