You are reading a single comment by @tve and its replies. Click here to read the full conversation.
  • 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.

About

Avatar for tve @tve started