Home
Public posts
API
Home
Public posts
API
Sign in with GitHub
1
function fact(n) {
2
if(n === 1){
3
return 1
4
} else {
5
return n * fact(n - 1)
6
}
7
}
8
console.log(fact(5))
9
10
11
12
13
14
15
16
17