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.
Creating arrays using the Array constructor is discouraged
huh? This answer is wayyyy too convoluted and slow.
This comment is hidden because it contains spoiler information about the solution
This answer is terribly slow and overly convoluted. Not best practices at all.
Using reverse and map and then reduce again for this problem is actually awful though. This solution was awful as well. Both your and his suffer from the problem of not knowing the language well enough to know the proper tool for the job.
A library? You mean the language's native methods? Ya, why use those when you could spend 20min typing out a long imperitive-style solution that will run slower than just typing a single line of code. 🤦♂️