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.
No problem, glad you solved it :)
Apologies, I thought that by marking my initial feedback as a spoiler, it would be inherited by all further comments.
Yeah, I did end up using that to solve the Kata.
I thought you had seen my solution and were hinting that there was a different one I could/should have used.
I don't want to spoil the kata, for this reason I marked your last message as a spoiler. It's just the first word of the function you wanted to use.
I advice you to use the Mozilla documentation for JavaScript, it's very clear and complete, and gives related search items at the bottom of each page.
I know you asked this question a long time ago, but I think it is because trim() removes leading and trailing white spaces. The Kata asks you to remove all spaces, including the ones in between strings of characters.
Ok so what is the similar function that does the same job?
I checked https://node.green/#ES2021-features, which shows that replaceAll is not supported on v14.x, but it does not present an alternative.
It is not available for the Node JS versions we are using on CodeWars at the moment. Look at the documentation and you will see. Though there exists a similar function that can do the same job easily.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution