In this task, you will fill an array with elements. Implement the countTheMonkeys()
function to return an IntArray
with elements from 1
to count
.
๐ก If count = 0
, return an empty array.
For example:
countTheMonkeys(5) // [1, 2, 3, 4, 5]
countTheMonkeys(8) // [1, 2, 3, 4, 5, 6, 7, 8]
countTheMonkeys(0) // [] (empty array)