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);
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);