JavaScript program to find the factorial of a number:

python tutorials and learn python

Created with Sketch.

JavaScript program to find the factorial of a number:

let number = 5;
let factorial = 1;

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

console.log("The factorial of " + number + " is " + factorial);

Leave a Reply

Your email address will not be published. Required fields are marked *