Skip to content

Instantly share code, notes, and snippets.

@skoon
Created May 7, 2010 22:40
Show Gist options
  • Save skoon/394100 to your computer and use it in GitHub Desktop.
Save skoon/394100 to your computer and use it in GitHub Desktop.
var f = function(args, body) {
return Function(args, body);
};
var alertFoo = f("foo","alert(foo)");
alertFoo("bar");
@skoon
Copy link
Author

skoon commented May 7, 2010

Using the f() function to create new anonymous functions does save you some characters, but minimizers won't work with the strings you have to pass in.

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