Created
February 5, 2014 23:44
-
-
Save benjaminEwhite/8835705 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeFunc(a) { | |
var name = a; | |
function displayName() { | |
alert(a); | |
} | |
return displayName; | |
} | |
var a = 'something'; | |
var myFunc = makeFunc(a); | |
myFunc(); | |
var a = 'else'; | |
myFunc(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment