Skip to content

Instantly share code, notes, and snippets.

@penartur
Created May 27, 2012 15:07
Show Gist options
  • Save penartur/2814621 to your computer and use it in GitHub Desktop.
Save penartur/2814621 to your computer and use it in GitHub Desktop.
Function definition:
function (x, y, z) { }
=>
function (this, x, y, z) { }
Function call:
f(x, y, z);
=>
f(null, x, y, z);
Method call:
o.f(x, y, z);
=>
f(o, x, y, z);
Constructor call:
var o = new F(x, y, z);
=>
var o = {}; F(o, x, y, z);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment