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 comment is hidden because it contains spoiler information about the solution
This soulution passed only basic test? bcs string from 4 numbers like '3333' is not a name)
Because the author doesn't mention it and everyone is lazy pretty much
In any case, the code above can give a name consisting of 4 digits.
Numbers in the basic tests:
assert.deepEqual(friend(["Ryan", "Jimmy", "123", "4", "Cool Man"]), ["Ryan"])
The tests only pass strings containing letters. Otherwise, it is expectable the description would state it, and provide some more examples to see the different cases.
Why is this solution the most popular? The case of "1234" will be valid, although the kata condition does not allow it: "If a name has exactly 4 letters"
This comment is hidden because it contains spoiler information about the solution
Exactly !
yaa , me too :D
or 'friend' :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
didn't think of using arrow notation to make the function even shorter ha ha thanks for this !
First time seeing a cheater translating LOL
Loading more items...