Skip to content

Instantly share code, notes, and snippets.

@garrettmac
Created September 15, 2017 04:14
Show Gist options
  • Save garrettmac/39cf2c75a23ccc0583acb62c519df7a0 to your computer and use it in GitHub Desktop.
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
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