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.
There is nothing new here, you've just rearranged my code.
ternary operator?
Looks good, but in terms of performance 4 filters, it's tough)
lol)
index?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You can argue for a long time how best to solve problems here. Personally, I solve with the fewest lines of code. This solution matches what I expect. This is an elegant solution. Who wants to sort out elementary things in cycles, please. You don’t invent bicycles later in your work, they did it for you.
wow, right)
An elegant solution. Unless in practice I would give more descriptive names.
Ok, if the goal was not to use ready-made functions. In practice, this is not how it is written.
And the meaning of this code, when it's cleaner with an arrow function?
I don't understand why a standard function is the best solution when it's the most elegant solution : )