Skip to content

Instantly share code, notes, and snippets.

@alanshaw
Last active August 29, 2015 14:06
Show Gist options
  • Save alanshaw/df2170c8d16787c0daf8 to your computer and use it in GitHub Desktop.
Save alanshaw/df2170c8d16787c0daf8 to your computer and use it in GitHub Desktop.
$ node
> function foo () {return this}
undefined
> foo.call(9)
{}
> foo.call("bar")
{ '0': 'b',
  '1': 'a',
  '2': 'r' }
> foo.call(9) + 0
9
> foo.call("bar") + ""
'bar'
> foo.call(9) == 9
true
> foo.call(9) === 9
false
@nelsonic
Copy link

What?! 😢

@alanshaw
Copy link
Author

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