This website works better with JavaScript
Halaman utama
Jelajahi
Bantuan
Masuk
eugeniy.ho
/
javascript_practice
Liatin
1
Bintangi
0
Fork
0
Berkas
Masalah
12
Tarik Permintaan
0
Wiki
Pohon:
bc99340f77
Ranting
Tag
master
javascript_p...
/
hw08
/
recursively_sum.js
recursively_sum.js
99 B
Riwayat
Mentahan
1
2
3
const sum = number => number > 0 ? number + sum(number - 1) : number;
console.log(sum(5)); // 15