Created
July 20, 2020 23:06
-
-
Save kermit-klein/f3754f1d86f01660e6e40fb1a8b9167b to your computer and use it in GitHub Desktop.
closure_example_2
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 outer = (x) => { | |
return (y) => { | |
return x*y; | |
}; | |
}; | |
outer(5)(5) // 25 | |
let store = outer(5) | |
store(4) // 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment