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.
Not entirely true since null or an empty array are falsy. Though when you get a string or a number other than 0, those are truthy. Or what if you have a variable with "true" as its value? Your solution is correct though.
his solution is good to use after you check that array is valid
Please don't post solutions without using spoiler flag again, thanks.
Please use spoiler flag next time.