Last active
June 28, 2018 00:14
-
-
Save juan-cortes/e81080297a0b5f013844e6542d192dd6 to your computer and use it in GitHub Desktop.
Closure example function factory
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 powerOfNFactory(power){ | |
return function generatedFunction(subject){ | |
return Math.pow(subject, power); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment