PS... on a side note: @Alexander, when you include code in posts, place it between two line that have only three (3) 'back-ticks' at the beginning and make sure there is an empty line before and after the lines with the back-ticks. This way all your code is furnished with line numbers, shows in one block, and is much more legible.
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.
PS... on a side note: @Alexander, when you include code in posts, place it between two line that have only three (3) 'back-ticks' at the beginning and make sure there is an empty line before and after the lines with the back-ticks. This way all your code is furnished with line numbers, shows in one block, and is much more legible.