Ad
  • Default User Avatar

    you need to test by passing something more complex to the function besides ABC. songDecoder("AWUBWUBWUBBWUBWUBWUBC"); This will help you understand why you're getting errors.

  • Custom User Avatar

    That's because without the join, it fails the first test, and with it, it fails the second.

    WUB should be replaced by 1 space: expected [ 'A', 'B', 'C' ] to equal 'A B C'           // error message without join
    multiples WUB should be replaced by only 1 space: expected 'A  B C' to equal 'A B C'     // with it
    

    The only error is in your code:

    JavaScript Completions 24695

    You can try changing Node version to 8 to see all the logs (no matter if your code fails), 10 onwards it stops when it fails one test and the next ones aren't executed.

  • Custom User Avatar

    There is no issue with the kata, your code is wrong.

    JavaScript Completions 24686

    And it'll fail with inputs like "AWUBAWUBA" too. Use console.log to evaluate middle values or something like Pythontutor