Tell us what’s happening:
Good evening people! i am in serious need of help here,I have been trying this algorithm and i can’t seem to get it right. Can someone please tell me what is wrong with my code.
please please please Your help would be greatly appreciated
here is it!!
function factorialize(num) {
var counter =0;
for(let i=1; i<=num; i++){
i *= counter;
}
return counter;
}
// function factorialize(num) {
// return num;
// }
factorialize(5);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
.
Challenge: Factorialize a Number
Link to the challenge: