x = {"a":3}; if (x.a) 4; else 5;
run in node.js:
> x = {"a":3}; { a: 3 } > if (x.a) 4; else 5; 4 >
run in espruino:
>x = {"a":3}; ={ "a": 3 } >if (x.a) 4; else 5; =undefined >
similarly if (x.b) 4; else 5; returns 5 in node.js and undefined in Espruino.
if (x.b) 4; else 5;
@tve started
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.
run in node.js:
run in espruino:
similarly
if (x.b) 4; else 5;
returns 5 in node.js and undefined in Espruino.