Skip to content

Instantly share code, notes, and snippets.

@4skinSkywalker
Created April 18, 2019 09:31
Show Gist options
  • Select an option

  • Save 4skinSkywalker/11485d0574f335c64d735cd074f88e61 to your computer and use it in GitHub Desktop.

Select an option

Save 4skinSkywalker/11485d0574f335c64d735cd074f88e61 to your computer and use it in GitHub Desktop.
function countdown(num) {
let array = []
function helperRecursive(n) {
array.push(n)
if (n === 0) return
helperRecursive(n - 1)
}
helperRecursive(num)
return array
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment