Ad
  • Custom User Avatar

    I am having the same issue

    EDIT: never mind, solved it, turns out I was reading for length before checking if the array is null or not. thanks to @Chrono79

  • Custom User Avatar

    What the description means is that if a player has reached the final tile, all subsequent calls should return "Game over!".

  • Default User Avatar

    your code mutates the input

  • Custom User Avatar

    You should add console.log(s) at the beginning of your function to see the whole input.

    And that's not your only problem but the * quantifier is greedy...

    Closing the issue since it's a problem with your code, not a problem with the kata itself.

  • Default User Avatar

    Please provide language (JavaScript?) and your code, cause it is difficult to give you any advice without info. Maybe you should check edge cases - empty string?