Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
nice
What is elegant about the solution in your opinion?
very elegant
This comment is hidden because it contains spoiler information about the solution
amazing
Fix what? Your solution? That's not our job, but yours.
If
a
is empty, then so should be the result. Why are you returning something else?in JS
passed all 40 tests
1 fail
a was [], b was [1,2]: expected [ 1, 2 ] to deeply equal []
console.log show [1,2]
it's return array with [1,2]
even when i write (if a.length === 0) return [1,2]
it's doesnt work.
Fix it please
Because you need to return a cube higher than 1.
test: With val = 1 and pow = 3 the answer should be 8: expected undefined to equal 8
1 ** 3 = 1?? why 8. but ok