I am just starting JS, and understand the concept of finding a factor. However, this snippet of code is what I have so far. I have the str variable that outputs nothing but the
function factorialize(num) { if(num === 0) return 1; var arr = []; for(var i=1; i<= num; i++){ arr.push(i); } num = arr.reduce(function(preVal, curVal){ return preVal * curVal; }); return num; } factorialize(5);