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.
very elegant!!!
just renaming the vars makes it much more readable
I had a similar function, but declared a variable first. Makes sense the whole thing could just be returned.
This is clever but not best practice. Only code that is clear should be allowed to be considered best practice.
Can you explain what "array size extension" is exactly? I'm looking at your answer and see "fill" and "concat". Would these not be considered array size extensions also? Is your answer the best answer? If so, is filling a new array and concat better than push and spreading? How come?
yes that solution is not be best because of unnecesary loops.
but yours has unnecessary array size extension (pushs) too. same with array destructuring
It's clever for sure. But usually clever != best practice.
I'm familiar (not expert) with regular explressions and this is hard to read.
You could say "get familiar with X concept and then it will be easy" for anything that is considered hard for the average person.
Best practice means best for the average person.
This is exactly what I did and I was wondering about this - thanks!
It's not that hard to read, if you're familiar with regular expressions. I recommend getting familiar, they are pretty useful.
Hard to read code is not best practice.
2 loops unnecessarily is not best practice.
The description was harder than the actual problem.
The description should be rewritten to be clear.
Exactly. This kata is too advanced for 6 kyu.
This is why this kata should be lower than 6 kyu. Performance and optimization is advanced stuff.
Loading more items...