You are right, it works perfectly well on a clean device.
It seems like passing a wrong argument (the '\x07' string) causes the error:
>String.fromCharCode('\x07') // wrong argument, but no complaint
="\0FD"
>String.fromCharCode(7) // correct argument, but extra chars
="\7FD"
>String.fromCharCode(8) // correct argument (above 8 every value gives the correct result)
="\b"
>String.fromCharCode(7) // correct argument below 8, always with extra chars
="\7FD"
(It was pretty hard to find out how to reproduce the effect.)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You are right, it works perfectly well on a clean device.
It seems like passing a wrong argument (the '\x07' string) causes the error:
(It was pretty hard to find out how to reproduce the effect.)