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.
true, there should be a test case for that
What about if null is passed?
clean solution.👍🏾
True, replacing
nums
with[...nums]
would fix it if that is neededBe careful. This solution will change the initial array.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
"Note that the array is sorted in place, and no copy is made."
Thanks for the fix!
Typescript does not compile, unsure if it's the test or something else
The test doesn't check for ''
If you set the greeting back to '', should it return 'Hello world!' or ''?