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.
I passed the test but I get two errors when I attempt the solution. The problem is, I don't know what the inputs are. I am unable to debug the test at this point. Printing the console log does not help as it does not clearly show which ones are arrays among the test inputs. Maybe I am unclear about the expected results of sparse array but at this point I find it difficult to debug my code. Does anyone have a useful tip or pointer that could help me?
FIRST ERROR:
Should return a split array: [[null],[null,null,0,""],[[null,null,null],[]]]
Log
Given array: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, END OF GIVEN
Result: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
SECOND ERROR:
Should return a split array: []
Log
Given array: 1,2,,3,4,,5,6,,7,8,,9 END OF GIVEN
Result: 1,2,3,4,5,6,7,8,,9
Got it. Thanks dude
This message means that for some test case, your solution returned
false
while it should returntrue
.Do you know what input makes your solution fail? If not, see here how to print function arguments, and then recreate the failing test case locally and debug through it in your IDE.
This comment is hidden because it contains spoiler information about the solution