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.
This seems 8th kyu easy. Am.... I.... EVOLVING?!?!?
The assertion messages display the inputs clearly, actual and expected results clearly, closing.
This suggestion cannot be implemented under the constraints of different programming language's paradigm. Also, the only thing you can restrict when it comes to lifting up the challenge to the next level is probably code length, which fits well in a code-golf task, but not here, so closing.
Not a kata suggestion. OP solved it, closing...
I made it hard for myself, i filter a[] and b[] for any unique numbers via two sets. (Maybe a new kata?)
Who can read is clearly in the advantage :D
TLDR: Read instructions properly and someone please make the test message less ambigous :)
This comment is hidden because it contains spoiler information about the solution
Both name (
arrayDiff
/array_diff
) is fine for the tests. Not a kata issue.Javascript: Tests assert for
array_diff
, boilerplate names function asarrayDiff
, should bearray_diff
Please use code formatting when posting code. See https://docs.codewars.com/training/troubleshooting#post-discourse.
Expected
x
to equaly
indicates that your function returnedx
when it should have returnedy
, not the other way around. Not a kata issue.Some extended test are wrong, please review them
Testing for arrayDiff([0,-12,20,1,20,-15,15,-8,-19,-19,1,2,3,17,-3,-5,19,-16,-18],[0,-12,20,1,20,-15,15,-8,-19,-19,1,2,3,17,-3])
Should work for random arrays too: expected [ +0, -5, 19, -16, -18 ] to deeply equal [ -5, 19, -16, -18 ]
0 it is in both arrays this shouldn't be in the array result, why are you expected 0?
Uhh... Is this really a yellow kata?
The solution is literally a one-liner.
learning this stuffs anyone who like to join me
This comment is hidden because it contains spoiler information about the solution
Olá Luca, o seu código apresenta um problema ao assumir que a variável 'b' possui apenas um elemento. Na verdade, 'b' pode conter múltiplos valores. Consoante você tem no seu código, você acessa apenas o primeiro índice da variável 'b'.
This comment is hidden because it contains spoiler information about the solution
Loading more items...