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.
That was my impression as well.
it is just attempt of code golfing: https://en.wikipedia.org/wiki/Code_golf
Should not be done for PROD ))
There is ZERO added value in programming like this in commercial applications. Unless you want the company to depend on you entirely for maintenance of production code. If a company allows this, they will reap what they sow sooner than later.
I am impressed by your ability to enchain your entire algorithm. Would you or do you do this in a commercial application?
If so what would be the usecase for doing so? Isn't there a balance between readablity and compactness? Especially if others will have to debug your code in the future? Cheers!
I enjoyed this problem. I love working working with time values. I few iterations and I was able to solve this. I have to be honest though. I used Bard AI a few times just so I didn't have to scroll through MDN a bunch. I wonder if time to solve these problems has steadily improved on average since AI became prominent.
No idea what you're trying to match with that regex, but it's not a kata issue. Either way, updated this kata's Node version, click reset and try again.
I attempted this using regex. It appears that my valid regex does not pass here. I tested my regex pattern and it works elsewhere. But, not here. Here is the pattern that causes the error: /[\s\p{P}]/gu.
No problem, and I almost forgot, check this to properly format your code in the posts.
Thanks for the feedback. I can see that people have been able to write this in just one or two lines. And, I will work on eliminating the redundency. Cheers.
Given you're just starting, it's not that bad. See other solutions and try looking for higher order methods on MDN Docs. Even without using higher order methods, try refactoring your code to make it smaller (note that you go through the array twice (and once more for the other array) and it can be done in a single pass). You could also write this as a comment of your solution (remember always to mark it as having spoiler content). Good luck.
This comment is hidden because it contains spoiler information about the solution