Skip to content

Instantly share code, notes, and snippets.

@loganlinn
Created January 11, 2011 01:42
Show Gist options
  • Save loganlinn/773848 to your computer and use it in GitHub Desktop.
Save loganlinn/773848 to your computer and use it in GitHub Desktop.
var object = {};
function fn(){
return this;
}
assert( fn() == this, "The context is the global object." );
assert( fn.call(object) == object, "The context is changed to a specific object." );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment