Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 275 Bytes

File metadata and controls

15 lines (9 loc) · 275 Bytes

Count down

Instructions

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

challenge | solution

Examples

countDown(1) // [1, 0]

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