Last active
December 25, 2019 13:25
-
-
Save anuragkapur/17426a23c922d66950c61001c52e811c to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/lapuxoq
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
const myAlert = () => { | |
const x = "Foo Bar"; | |
let count = 0; | |
const alerter = () => { | |
console.log(`${x} ${++count}`); | |
}; | |
return alerter; | |
}; | |
const funcAlert = myAlert(); | |
const funcAlert2 = myAlert(); | |
funcAlert(); | |
funcAlert(); | |
funcAlert2(); | |
funcAlert2(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment