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.
What was the issue? I'm getting the same error and am not sure why.
Change the order of your null check. Since code executes from left to right, the null value will be checked if it has a length less than 2 then it will check if it is a null. However, you want to check if it is a null first since a null value can't have a length and therefore fails the first bit of the null check.
Change it to
if (numbers == null || numbers.length < 2)
This comment is hidden because it contains spoiler information about the solution
Oh never mind I figured it out!!
This comment is hidden because it contains spoiler information about the solution