.Write a javascript program to accept a number entered in textbox and find the factorial of that number
Answers
Answered by
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