Skip to content

Instantly share code, notes, and snippets.

@texel
Created June 13, 2014 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save texel/33972773f494648b7c9e to your computer and use it in GitHub Desktop.
Save texel/33972773f494648b7c9e to your computer and use it in GitHub Desktop.
var returnMeAFunction = function () {
var integer = 1;
var string = "Pancakes";
var f = function () {
console.log("integer is " + integer + " and string is " + string + ".");
}
return f;
}
var newFunction = returnMeAFunction();
newFunction();
// integer is 1 and string is Pancakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment