This commit is contained in:
Karan
2021-11-24 20:33:30 +05:30
parent f6c64b93e6
commit 39f7de9b6a
6 changed files with 0 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
let start = 10;
function loop1(val) {
console.log(val);
if (val < 1) {
return
}
return loop1(val - 1);
}
loop1(start);
function loop2(val) {
console.log(val);
if (val > 0) {
val--;
return loop2(val);
}
return;
}
loop2(start);