Skip to content

Instantly share code, notes, and snippets.

@daytonn
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save daytonn/2d0bdbaa9621d3aad207 to your computer and use it in GitHub Desktop.

Select an option

Save daytonn/2d0bdbaa9621d3aad207 to your computer and use it in GitHub Desktop.
CWCPOOJS - dynamic function assignment
var greeterCreator = function(greeting) {
return function(name) {
console.log(greeting + " " + name);
};
};
var helloGreeter = greeterCreator("Hello");
helloGreeter("Chicago Web Conf");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment