Skip to content

Instantly share code, notes, and snippets.

@maccman
Created March 7, 2010 23:50
Show Gist options
  • Save maccman/324733 to your computer and use it in GitHub Desktop.
Save maccman/324733 to your computer and use it in GitHub Desktop.
var calls = ["one", "two", "three"]
var name;
for(var i in calls) {
name = calls[i];
this[name] = function(){
alert(name);
}
}
this.one()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment