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.
yes thanks for reminding me of .slice
thank you
As Chrono79 said it sounds like you're mutating the input array. If you're using .sort to sort the array from smallest to largest (or vice versa) it will mutate the array you're calling sort on. If you don't want to mutate the input array, you should make a copy of it first using .slice().
If you meant the kata expect the value being 1, you're mutating the input array (99.9% sure).
Can someone pls tell me how is it possible for [2, 3, 1].indexOf(2) to return 1 instead of 0 ? If I write this into the browser it returns 0 but when I do this on this kata, this gives me 1.(I use js)