Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Return the factorial of the provided integer.
// Bonfire: Factorialize a Number
// Author: @piqueen314
// Challenge:
// Learn to Code at Free Code Camp (
function factorialize(num) {
var fac=1;
if (num ===0){
return fac;
for(var i=1; i<=num; i++)
fac = i*fac;
return fac;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.