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.
Sorry, my bad. Figured it out. Cheers.
That's a problem with your code. Print the input and debug it. Or add this test to sample tests and see your code fail:
There is no problem with the tests:
When I press "Test", it returns "You have passed all of the tests! :)".
However, when I press "Attempt", it returns an error in Random tests.
Take a close look at the expected results of any random test:
expected
[ 'Mn', 'Wc', 'kU', 'Xp', 'yw', 'fx', 'Uf', 'qp', 'F_', 'FH', 'vX', 'DU', 'Py', 'HI', 'DT', 'jO' ]
to deeply equal
[ 'Mn', 'Wc', 'kU', 'Xp', 'yw', 'fx', 'Uf', 'qp', 'FM', 'FH', 'vX', 'DU', 'Py', 'HI', 'DT', 'jO' ]
If you say there's no problem in random tests, how come 'F_' is supposed to equal 'FM'?!
No, there is no problem in random tests in javascript. That's your code's problem, read this: https://docs.codewars.com/training/troubleshooting/
If your regex doesn't match anything, it returns
null
, and you then try to use.map
on it (so you get this error).This comment is hidden because it contains spoiler information about the solution
There seems to be a mistake in random tests when you hit "Attempt"