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.
The test that you're failing is when both arrays are empty.
This comment is hidden because it contains spoiler information about the solution
If you want to post code, mark it as a spoiler. The author of the Kata will be able to read it.
This comment is hidden because it contains spoiler information about the solution
Your solution doesn't respect the same multiplicity condition. That means with a test like this:
comp([2, 2, 3], [4, 9, 9])
orcomp([2, 3], [4, 9, 9])
you code will return true.You can check the input using console.log in javascript.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
If the input array is empty or null, return an empty array
.So, the check for an empty array is missed.
This comment is hidden because it contains spoiler information about the solution