Skip to content

Instantly share code, notes, and snippets.

@4skinSkywalker
Last active April 18, 2019 08:05
Show Gist options
  • Select an option

  • Save 4skinSkywalker/0269fe4727aa3dd0aecd62a6726dc28f to your computer and use it in GitHub Desktop.

Select an option

Save 4skinSkywalker/0269fe4727aa3dd0aecd62a6726dc28f to your computer and use it in GitHub Desktop.
function countdown(num) {
console.log(num)
// Base Case with return inside
if (num === 0)
return
// recursive call with a different input
countdown(num - 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment