Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 280 Bytes

File metadata and controls

15 lines (9 loc) · 280 Bytes

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]