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 dont get it. why this return 1 -~
Loll
No, what I mean is
[1,2,3,]
has no differences from[1,2,3]
at all. If you want one hole at the end, you need 2 commas:[1,2,3,,]
.This is right, but what does it mean for the test case? The test asserts [, 0, 1, '1', ], which leaves off the final empty element because it's being initialized in place. But I think the intention is for that test to have an empty element in the end.
Description example test is wrong.
Reference solution changes length of array on trailing removed values. This is unspecified.
Needs random tests
It's now changed to
assertSimilar
, but really it should beassertDeepEquals
.Reminder: Arrays and objects allow a trailing comma on initialization (which has no effect, as if it didn't exist), so you need an extra comma to denote empty elements in the end.
The sample tests use
assertEquals
.