Build a Factorial Calculator - Build a Factorial Calculator

Tell us what’s happening:

I’m unable to pass step 12 for some reason.

Step 12: 12. Your resultMsg should contain a string in a format Factorial of [num] is [factorial].

Your code so far

const num = 5;

function factorialCalculator (number) {
  let result = 1;

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

const factorial = factorialCalculator(num);

const 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/137.0.0.0 Safari/537.36

Challenge Information:

Build a Factorial Calculator - Build a Factorial Calculator

Look carefully again at what should be returned. Your result adds something that was not asked.

oh the full stop, thanks.