Created
September 15, 2017 04:14
-
-
Save garrettmac/39cf2c75a23ccc0583acb62c519df7a0 to your computer and use it in GitHub Desktop.
MEDIUM BLOG POST - Javascript’s 3 Major Paradigms: The Five tenets of Functional Programming [part 3 of 4] Copy Raw
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 iterativeFactorial(n) { | |
let product = 1; | |
for (let i = 1; i <= n; i++) { | |
product *= i; | |
} | |
return product; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment