This commit is contained in:
Karan
2021-11-30 18:16:23 +05:30
parent 17d89b436a
commit b87492137f
15 changed files with 0 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
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);