-
-
Save jimdel/3d8957bf2d3bb0467f3f3b8da88d9749 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function countdownToOne(num) { | |
//Base Case | |
if (num === 1) { | |
console.log(num) | |
} else { | |
//Recursive Case | |
console.log(num) | |
return countdownToOne(num - 1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment