Build a Factorial Calculator - Build a Factorial Calculator

Tell us what’s happening:

My code is passing all tests except for calling the function with num but it still doesn’t work what am I doing wrong?

let num = 5;

function factorialCalculator (num) {
  let result = 1;
      for(let i=1; i <= num; i++){

           result = 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/142.0.0.0 Safari/537.36

Challenge Information:

Build a Factorial Calculator - Build a Factorial Calculator

you have extra spaces at the end of the line that are tripping the tests

hey thank you which line i’ve removed all the spaces from in between the variables and the function but still having the same issue

let num = 5;

function factorialCalculator (num){

  let result = 1;

      for(let i=1; i <= num; i++){

         result = result * i;

      }

return result;} 

let factorial = factorialCalculator(num);    

let resultMsg = `Factorial of ${num} is ${factorial}`;

console.log(resultMsg);

you still have spaces at the end of this line

thank you kindly that worked