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.
The error messages are completely useless.
Double the satisfaction. Once with some good coding practice, and a second time seeing the creative ways used to cheat 😋
Yes, my solution follows the task literally. But since title is to implement the
List
and there are descriptions of what methods should do still I think solution should work as if noArray
existed at all. We can not remove it totally, but we can develop test criterias which will check if this requirement is fulfilled. For example, remove all methods fromArray
prototype and as you said check return types of methods.But maybe I'm just not satisfied with Kata's complexity and digging to deep. :) Then again if we follow the rules literally,
.filter()
should work exactly asArray
's one does, thus return anArray
.Pfff... who knows? ^^
You're returning an object with a length property, values on numerical keys, and method getters pointing to Array methods.
It's as close to an array as you'll come, but it's an object which is not an array. It's legal. It's not a cheat.
It may feel like a cheat, but because after all everything is an object, how are you going to distinguish a too simple one from a sufficiently complicated one, and where do you draw the line?
I have no better solution.
Edit: Hmm ..
.filter()
doesn't return aList
; it returns anArray
. (More solutions are guilty of this.) Would that be a fair requirement? (It's not explicitly specified.)Why the downvote? What did I do wrong? If I don't know, I can't fix it.
(Aimed at downvoter, not necessarily at OP.)
Why the downvote? What did I do wrong? If I don't know, I can't fix it.
(Aimed at downvoter, not necessarily at OP.)
Why the downvote? What did I do wrong? If I don't know, I can't fix it.
(Aimed at downvoter, not necessarily at OP.)
Why the downvote? What did I do wrong? If I don't know, I can't fix it.
(Aimed at downvoter, not necessarily at OP.)
Still can cheat. :)
The most blatant workarounds have been invalidated by a test for a
List
not actually being anArray
.Actually completely disabling
Array
is rather tricky.Improved. Won't say it's fixed, but it's better than it was.
A test for a
List
not actually being anArray
has been added.Deleting
Array
is rather tricky.Fixed.
Should be fixed.
Loading more items...