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; }