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.
Chess grid is not part of input, and you do not have to build it.
You do not need the whole board to solve this kata.
Thank you
I am not sure what it would mean. What kind of incorrect handling would the editor do?
I have some problems understanding what "it" would be, but tests are not doing anything to anything, other than invoking your solution and comparing it with an expected answer.
It's difficult for me to believe. Your code does indeed not solve the task of the kata correctly, and there's no chance it would pass tests anywhere else, unless they are not exhaustive enough and test only some subset of scenarios. It's enough to study sample tests to notice what's the difference between your results and expected results.
Focus on sample tests, especially on the test case with input of
"AWUBWUBWUBBWUBWUBWUBC"
, see what your solution returns, what is expected answer, and what it returns in other editors.I told you, the first test passes, the second one doesn't, and it won't pass in any editor, your code doesn't replace multiple WUBs with only one space. Try using something like this to see it: http://pythontutor.com/javascript.html#mode=edit
Your code is wrong, and it fails in repl.it too.
If you add a
console.log(arr)
before the return line, you'll see this:['A', '', '', 'B', '', '', 'C']
When your code returns undefined, you
console.log
the first test, which works and shows you a single space between letters, when you return, the second test fails.Not a kata issue.