Skip to content

Instantly share code, notes, and snippets.

@ClausPolanka
Created July 27, 2010 13:58
Show Gist options
  • Save ClausPolanka/492248 to your computer and use it in GitHub Desktop.
Save ClausPolanka/492248 to your computer and use it in GitHub Desktop.
function greeter(salutation) {
var counter = 0;
var prefix = '. ' + salutation + ' ';
return function(name) {
counter++;
return counter + prefix + name + '!';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment