Also, where did you get the second bit of code from? Did you write it yourself in ES6 syntax?
I just noticed you've written oxff an not 0xff, so that wouldn't work either. It shouldn't crash, but would throw a ReferenceError when it executed that bit
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.
Also, where did you get the second bit of code from? Did you write it yourself in ES6 syntax?
I just noticed you've written
oxff
an not0xff
, so that wouldn't work either. It shouldn't crash, but would throw aReferenceError
when it executed that bit