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's a more readable solutiont than with reg exp
Simple and Сlearly
As for me the best sol., and liberates you from learning REG EXP
It is best practice to create a new variable instead of mutating the original one (string)
I used similar to this except in the If statement used a regex to test the case
If there would be a number in the string, for whatever reason, this would fail.
"5" === "5".toUppercase(); // this is true.
Nice solution
This is the first solution that came to my mind 👍🏻
I am reaally sorry :( i TRIED to delete but i couldnt :(
Please, use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
and how did I not think of this? Awesome!
nice tip thanks:)
You can just map throug the string itself with the for..of loop without splitting it to a list first.