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 is pretty simple as far as regex goes. By this argument, nobody should ever use ANY regex since it would be too hard to read.
It's quite readable
thanks for your advice, i will take it into consideration next time
This comment is hidden because it contains spoiler information about the solution
Splicing the parameter will modify the original array which might cause code to break elsewhere.
Best approach here to avoid that is to clone items. If it is a shallow array like so:
const itemsClone = [...items];
Not sure if this can be classified as "best pratice" if most developers here can't seem to understand what it does.
Who is to blame here, the developers for not having a decent understanding of regex, or the code being unreadable?