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.
Answered by Chrono.
@Unnamed: Not for javascript (Steffan already fixed it), see the current first post, I though maybe some of the other translations could have the same problem (didn't check).
I posted it here so those other translations were checked and also for the snake emoji.
@Chrono79 But reference solutions are called before users' solutions, so ownership can be passed safely (and in Dart I think List is immutable), so what's the difference?
Fixed in all languages.
Well, I didn't know about that emoji
edit: lol found an emoji for PHP:
Please, pass a copy to the user's function to avoid problems with input mutation, and you also missed for Python in this post
Don't mutate the input array.
Well, now it's been fixed in the test suite, but it was because of that.
The input was mutable in random tests in javascript. Already fixed.
This comment is hidden because it contains spoiler information about the solution
Sorry, I forgot that part! :)
thanks!!
^ That
Hi, I'm trying this kata, but it seems that your tests are wrong with the numbers higher than 10:
it("Testing for [4, 6, 7, 1, 3]", () => assert.deepEqual(incrementer([4, 6, 7, 1, 3]), [5, 8, 0, 5, 8]));
it("Testing for [3, 6, 9, 8, 9]", () => assert.deepEqual(incrementer([3, 6, 9, 8, 9]), [4, 8, 2, 2, 4]));
it("Testing for [1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 8]", () =>
assert.deepEqual(incrementer([1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 8]), [2, 4, 6, 8, 0, 2, 4, 6, 8, 9, 0, 1, 2, 2]));
});
the first one should return [5, 8, 10, 5, 8], the second one [4, 8, 12, 12, 14] and so on. Can you fix it so I can complete it?
Thanks!