Social Sciences, asked by sahilsurwase06590, 7 months ago

.Write a javascript program to accept a number entered in textbox and find the factorial of that number​

Answers

Answered by espsvp
1

Answer:

function factorial(n){

let answer = 1;

if (n == 0 || n == 1){

return answer;

}else{

for(var i = n; i >= 1; i--){

answer = answer * i;

hope it helps:)

make me brainy

Similar questions