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.
Yeah, I realized it afterwards too. However, learned some new things tonight, not only about JS's intricacies. Thank you!
@Welpy, you apparently also changed the example solution. That wasn't necessary.
It wasn't an issue with his code. The reference solution, which was called after the user solution, was modifying ( reversing ) its inputs.
Very, very sloppy kata design. Now fixed ( see above ).
OK, fixed in the editor.
Renamed reference solution to sensible name, because in JS test suite is inaccessible from user solution.
Reference solution looks fixed. User can still modify inputs. I'll add a couple of
[... ]
there also. Wait one.I tried to improve balygaby's reference solution and test cases in this regard. Please check.
hell yes. thank you
Haskell translation
( JS )
The reference solution is a mess of undeclared variables and changes its inputs. User can also modify inputs.
Wtf?!😂😂😂
In your first loop, you only filter out items from a[] if they are at the same location as an item of the same value in b[]. That is not what the description specifies. Try reading it again.
And your second loop: I have no idea, what you're even attempting to do there, or why.
This comment is hidden because it contains spoiler information about the solution