You are reading a single comment by @zooeyzooey and its replies. Click here to read the full conversation.
  • I might be way off the mark with this, it's a long time since I did anything with JavaScript but does your use of indexof fail when there is only one number in the input string? As cyclotron mentioned an input of "1" and "one" should both produce 11, indexof will only find the first index and you need to also find the last index (which in this case is the same).

  • Don't have time to go through your code (and I've never really done .js) but if you post your input in a gist and the individual numbers each line produces I can see what mine does differently and give you a hint.

    (You obviously don't just want to be told what the answer should be as there's no fun in that.)

About

Avatar for zooeyzooey @zooeyzooey started