The issue is that currently || (and &&) cast the values to booleans - rather than returning the value if it is true. Hopefully it's not a hard fix though.
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.
Hi Matt,
Probably the best place for this kind of thing is the Espruino github issue tracker. I've just made a bug for this: https://github.com/espruino/Espruino/issues/251
The issue is that currently
||
(and&&
) cast the values to booleans - rather than returning the value if it is true. Hopefully it's not a hard fix though.