Skip to content

Latest commit

 

History

History
 
 

countdown

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Count down

Instructions

Given positive integer n implement a function which returns an array containing all steps from n to 0.

Challenge | Solution

Examples

countdown(1) // [1, 0]

countdown(4) // [4, 3, 2, 1, 0]