Hey campers; am currently working on the factorize a number challenge each number works except for zero. this is my code what could be the problem?
function factorialize(num) {
var arr = [];
var singleVal =0;
for(i=1; i<num+1; i++){
arr.push(i);
}
singleVal = arr.reduce(function(a,b){return a*b;});
return singleVal;
}
factorialize(5);