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.
this kata is more than 10 years old. Classes were introduced in ES2015. (by the way, classes are no longer merely syntactic sugar for prototypal objects; private class features for instance can hardly be emulated with pre-ES2015 JavaScript)
why not use a class? I get that a class is just syntactical sugar and it's doing this under the hood but why do it like this?
Great!
Good one with the prototype. but if the object will be created with the class, the prototype is created automatically.
I did it almost the same. Yours is nicer.
I'm sure current tests would pass without it but consider the case:
iterable = [undefined, undefined, 'a', 'b', 'c']
That method didn't exist in earlier JS versions.
just the zen of python ;)
but the point I was focusing is the build-in filter
Enveloping a function into a class for no particular reason sure makes a lot of sense ;)
none of you read the title!
where is that filter???
checkout my solution!
this solution does also use a foor-loop
beatiful
just for arguments sake, i wouldnt make human an interface since men and women share attributes, not just behaviors
This comment is hidden because it contains spoiler information about the solution
Thank you very much for your reply ;)
Loading more items...