Add code for chapter 3 and 4 in ts (#103)

This commit is contained in:
Alex
2019-03-28 23:51:36 +02:00
committed by Aditya Bhargava
parent 97003f16df
commit d77cde9e67
8 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
function countdown(i: number): null {
console.log(i);
if (i <= 0) {
return null;
}
countdown(i-1);
return null;
}
console.log(countdown(5));