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.
You're also confusing the test input, console.log comes before the test result, the input you're seeing is of the next test, not from the test you failed.
I got this test failed too. I use console.log to print out the input arrays a and b , I found that this failed test ( a was [1,2,2], b was [2], expected [1] ) is caused by wrong input... The test says b is [2], but exactly b is [] from log.
@kinluek mutating the array you use in a loop is never a good idea, you'll be skipping values like that, it's not a kata issue, it's a problem with your code.
Your solution looks good, especially the comments! Stick with it ^.^
yeh! I'm new to coding so didn't know about the whole object comparison thing
This comment is hidden because it contains spoiler information about the solution
can somebody help me with my code? it passes all tests apart from the randomized string test.
Just saw this. I noticed you have a solution for the kata. Seems like you figured it out ^.^
I liked the Kata even tho my solution ended up being probably fairly inelegant and inneficient.
The only problem i have with it is i found the exemple given in the description lacking, at first i thought only number from 1-9 could appear in the array and that the returned array should always be of length 10. Had to hack and duck tape my original solution. but its still a nice problem maybe if you gave an example that show an integer above 9 in the array to pass through the function airheads like me would get the problem faster :p.
This comment is hidden because it contains spoiler information about the solution
I also get the same error on the same test, and if I change the sample tests to the one above it checks out.
(EDIT) Our code is wrong - b.length can be shorter than a.length, so it stops by the first iteration
the code is in javascript, could you please take a look at it for me and see what the problem is? thanks
This comment is hidden because it contains spoiler information about the solution
Edit: JS working totally fine for me, and the tests are not flawed in any way. You can post your code here with a spoiler tag if you require some help as most probably your code is doing something wrong.
for some reason when I attempt I get this error message on test 3: a was [1,2,2], b was [2], expected [1], however when I have put these values for a and b in the sample tests I get the right answer, [1], so i think there is a bug in the final test
Loading more items...