Build a Factorial Calculator - Build a Factorial Calculator

Tell us what’s happening:

Step 6 comes as incorrect and i can’t figure it out.

Your code so far

let num = 5;

const factorialCalculator = (number) => {
  let result = 1;

  for (let i = 1; i <= number; i++) {
    result *= i;
  }

  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/151.0.0.0 Safari/537.36

Challenge Information:

Build a Factorial Calculator - Build a Factorial Calculator

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-factorial-calculator/66c07238b01053abaf812065.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @rafa.henri99,

It seems the tests are expecting a regular function. I’ll report this.

Happy coding