Last active
July 20, 2018 19:36
-
-
Save raikusy/98b5076744d38984d9bb358e1f09e73f to your computer and use it in GitHub Desktop.
Calling GF using actual closure!
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 callGf() { | |
var name = 'Jorina'; | |
return function() { | |
console.log('Calling ' + name + ' jaan...'); | |
} | |
} | |
var calling = callGf(); | |
calling(); | |
// same as doing: callGf()(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment