This website works better with JavaScript
Home
Esplora
Aiuto
Accedi
eugeniy.ho
/
javascript_practice
Segui
1
Vota
0
Forka
0
File
Problemi
12
Pull Requests
0
Wiki
Albero (Tree):
bc99340f77
Rami (Branch)
Tag
master
javascript_p...
/
hw08
/
recursively_sum.js
recursively_sum.js
99 B
Cronologia
Originale
1
2
3
const sum = number => number > 0 ? number + sum(number - 1) : number;
console.log(sum(5)); // 15