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.
I did it almost the same. Yours is nicer.
That method didn't exist in earlier JS versions.
very slow
no need to return an array from arrayShiftToEnd method.
"length" is an attribute of Array, not a method of Array, so it's ok.
The function here is just for grouping and doesn't add any special method classes that do work. You can easily copy the function code and put it exactly where the function call is and it will work exaclty the same.
Not as true to the specs as it could to be, and not as efficient as it should be, but I wouldn't call it 'cheating'
and now?
It is not required for this algorithm, it says so in the footnote
"Note: This kata uses the non-padding version ("=" is not added to the end)."
In Javascript functions call as objects, right? (you can create a function f and check with "f instanceof Object"), so it's cheating :-/
No need to 'use undefined'. It works perfectly if in the arrayShiftToEnd for loop the end condition is modified to i < array.length - 1
:)
hm... why I didn't use undefined?)))
length
isn't a prototype property.I didn't know the "Array.length" is allowed
jesus christ this was so easy
Loading more items...