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.
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.
Let's say array1 is
[2, 2, 3]
and array2 is[4, 9, 9]
, what does your code return?Because
2 * 2 != 9
Why is it false?
This comment is hidden because it contains spoiler information about the solution