Write cubes(n) that returns [1, 8, 27, …, n³].
cubes(n)
[1, 8, 27, …, n³]
cubes(3) → [1, 8, 27]
cubes(0) → []
Submit runs 4 tests, including hidden edge cases.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.