Factorialize a Number, freeCodeCamp review Basic Algorithm Scripting, lesson 2

Lesson Summary

In this challenge, we factorialize a number. I achieved this using a for loop which checks if the number passed in to our parameters is greater than our counter(i). As long as it is, it multiplies i by our variable total which we declare and initilize to 1. As it goes through the loop our total is updated until 'i' is equal to our number passed into the 'num' parameter.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required