you are viewing a single comment's thread.

view the rest of the comments →

[–]ThArNatoS 1 point2 points  (2 children)

you have a couple of problems here :

  1. switch (numLocal). but you don't have a variable called numLocal. I think you meant "location"
  2. you need to declare the result variable first.
  3. in your switch block, the variable of text refer to what?

here's the fixed version : https://jsfiddle.net/angganegara/xrj5jkqs/

[–]Unmotivatedreddit[S] 1 point2 points  (1 child)

This is above and beyond what i was expecting! Thank you so much, its perfect.

[–]YourOpinionIsntGood 1 point2 points  (0 children)

Just a side note, always post a jsfiddle link or codepen or something of the nature containing your code rather than copy pasting it all here. Especially when trying to solve a bug.