• Pretty sure this is a noob question, but in my watch face I want to replace something inside a string. So I just did

    mystring = mystring .replace('.', ''); 

    and got

    Uncaught Error: Function "substring" not found!

    Any ideas why that wouldn't work?
    Same with substring.

  • I just tried it on the banglejs 2 emulator and it worked fine, I'm pretty new to Espruino myself but 2 things I'd check, is the firmware up to date and can you run it directly in the terminal?

  • It is actually working in the emulator console.

  • OK, never mind, I had an array instead of a string in my code.
    Thanks for your help though.

  • OK, and if you send your code to the emulator, does it work there?
    If not, can you then share your code via pastebin.com or similar? :)

  • Heh, yeah that will certainly confuse the poor thing xD


Uncaught Error: Function "substring" not found!

Posted by Avatar for Hank @Hank