Build a Factorial Calculator - Build a Factorial Calculator

Tell us what’s happening:

Test 12 and 13 don’t pass, the format I’ve used seems to be correct for test 12

Your code so far

let num = 6;

function factorialCalculator(num) {
let result = 1;
  for(let i = 1;i <= num ; i++) {
    result = result * i
    console.log(result);
  }
return result;
}
let factorial = factorialCalculator(num)
let resultmsg = `Factorial of ${num} is ${factorial}`;
console.log(resultmsg);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Factorial Calculator - Build a Factorial Calculator

Is this the variable you were asked to create? Look closely at capitalization.

2 Likes

Thank you so much for that