This website works better with JavaScript
Accueil
Explorer
Aide
Connexion
eugeniy.ho
/
javascript_practice
Suivre
1
Voter
0
Fork
0
Fichiers
Tickets
12
Pull Requests
0
Wiki
Aborescence:
bc99340f77
Branches
Tags
master
javascript_p...
/
hw08
/
recursively_sum.js
recursively_sum.js
99 B
Historique
Raw
1
2
3
const sum = number => number > 0 ? number + sum(number - 1) : number;
console.log(sum(5)); // 15