Saved, and it works great, so there's nothing specifically wrong with onInit. I wonder if you're using 'Save on send' in the IDE or some other option that is confusing things.
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.
@Vladimir can you post your problem as a new thread in http://forum.espruino.com/microcosms/1083/ with the code you're using?
I just tried this:
Saved, and it works great, so there's nothing specifically wrong with
onInit
. I wonder if you're using 'Save on send' in the IDE or some other option that is confusing things.