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 comment is hidden because it contains spoiler information about the solution
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)
Also this code doesn't work if you pass a parentheses combination like that one:
console.log(removeParentheses("((())") //expected to be "(" but not ""
Does not work if you pass the deadline without closing brackets
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!
I always do the brute force and get schooled in the solution ssection :((((