Created
April 7, 2019 09:59
-
-
Save EngPeterShaker/43798dc46413111d92ec22810111962b to your computer and use it in GitHub Desktop.
function that returns a function that returns a function
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 a(a) { | |
function b(b) { | |
function c(c){ | |
return a * b * c; | |
} | |
return c; | |
} | |
return b; | |
} | |
console.log(a(33)(22)(2)) // a* b *c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment