Ad
  • Custom User Avatar

    No problem, glad you solved it :)

  • Default User Avatar

    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.

  • Custom User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution