Created
July 27, 2018 10:49
-
-
Save mosijava/0adb8c30e0ea2782a9be33eb77fa3347 to your computer and use it in GitHub Desktop.
a very simple closure example
This file contains hidden or 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 sayHelloToClosures(yourName) { | |
var text = 'Hello Closures from' + yourName; | |
var sayAlert = function() { alert(text); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment