This website works better with JavaScript
Página inicial
Explorar
Ajuda
Entrar
eugeniy.ho
/
javascript_practice
Observar
1
Favorito
0
Fork
0
Arquivos
Issues
12
Pull Requests
0
Wiki
Tree:
bc99340f77
Branches
Tags
master
javascript_p...
/
hw08
/
recursively_sum.js
recursively_sum.js
99 B
Histórico
Raw
1
2
3
const sum = number => number > 0 ? number + sum(number - 1) : number;
console.log(sum(5)); // 15