Skip to content

Instantly share code, notes, and snippets.

@MinimumViablePerson
Last active December 31, 2019 11:24
Show Gist options
  • Save MinimumViablePerson/0472b88296a14694e400939c07275519 to your computer and use it in GitHub Desktop.
Save MinimumViablePerson/0472b88296a14694e400939c07275519 to your computer and use it in GitHub Desktop.
Recursion from Scratch - countdown with a for loop
const countdown = number => {
for (let i = number; i > 0; i--) {
console.log(i)
}
console.log('HAPPY NEW YEAR!')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment