Skip to content

Instantly share code, notes, and snippets.

@sreeprasad
Created August 8, 2012 11:02
Show Gist options
  • Save sreeprasad/3294276 to your computer and use it in GitHub Desktop.
Save sreeprasad/3294276 to your computer and use it in GitHub Desktop.
From LinkedIn Techtalk
function calc(x){
thix.x=1;
this.x+=y
}
funciton Foo(){
}
Foo.prototype.result= new function{
return this.x;
}
var f1= new Foo();
calc.call(x,y);
alert(f1.result());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment