function fact(x){
var factorial = 1;
for(var i = 1; i<=x; i++){
factorial = factorial * i;
}
return factorial;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
function fact(x){
var factorial = 1;
for(var i = 1; i<=x; i++){
factorial = factorial * i;
}
return factorial;
}