factorial in javascript program

technical talkiess
0

 <script>

const num1 = prompt("Enter the positive number");


for(var i=1;i<=num1;i++){

if(num1 % i == 0)

{

alert("The factorial of the no is" + i);

}

}

</script>

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)