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.
should be '542 -214' but you get '6 -214'
Your code is returning
"6 -214"
when it should be returning"542 -214"
. You can see this if you doconsole.log(highest + " " + lowest)
before you return.Your issue has to do with how the sort method handles a collection of strings verse a collection of numbers. It is a common mistake people do in this kata. For more explanation, you can see this.
I'll check if I can make the test case failure messages make more sense in JavaScript, but I don't think it is possible.
I wonder why the "Testing common string sort mistake" test case didn't fail.
This comment is hidden because it contains spoiler information about the solution
It's because you modified sample tests yourself, that's why. Look at the last line in your screenshot, there's no expected value for it. That's why they're sample tests, because you can modify them at any time. If you want to see what sample tests there should be, copy your solution and hit 'reset'.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You can always hit 'Attempt', no matter if 'Test' fails or not (it's different tests suite). The error message tells you that you returned 'Draw', but it should be 'Draw!'. Maybe you modified the code after posting it here?
This comment is hidden because it contains spoiler information about the solution
I also just copied it and it works fine. Are you adding some extra code that you're not showing us? To attach a screenshot, you can upload it somewhere, and show it here using syntax:

See: https://docs.codewars.com/references/markdown/#links
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You have a typo, it's
scissors
notscissor
.Copied/pasted your code and it worked just fine. Also, please mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution