maybe with numbers beware that bitwise and may not behave exactly as &&, see true & 4 below (true is conveted to value 1 and 1&4=0) so it makes sense to convert numbers into bool expression like you did with E.getBattery()<10 so if (width & whatever) should better be if (width>0 & whatever)
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.
maybe with numbers beware that bitwise and may not behave exactly as &&, see
true & 4
below (true is conveted to value 1 and 1&4=0) so it makes sense to convert numbers into bool expression like you did withE.getBattery()<10
soif (width & whatever)
should better beif (width>0 & whatever)