Factorial Program in JavaScript using While Loop
To find factorial of a number, we need to multiply backward consecutive numbers till 1 starting from that number. We represent factorial with ! symbol. For example, 4 factorial is written as 4! = 4 x 3 x 2 x 1 In this example, we’ll write a factorial program in JavaScript using a while loop. … Read more