• It's because when code is sent to Espruino it is executed as if you typed it in. If there is a newline at root scope and the statement by itself is complete then it is executed.

    It's done so it can execute more code than could actually be fitted into memory.

    Basically I've had to manually add hacks for the common ways people do strange formatting, but there are obviously a few ways I haven't covered.

    Just write code in the 'normal' coding style and it'll be fine. Would be good if you could file a bug on the Web IDE github for this though.

About

Avatar for Gordon @Gordon started