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 with null, no.
Any line where you use
length
without properly checking if it is an array before.One of the tested inputs is
null
. Your function needs to be able to handle it, but as you have it written now, the function fails because you try to find the length ofnull
.Read the error message:
TypeError: Cannot read property 'length' of null
it's not the length what is null, it's the value passed to your function, andnull
has no length.