Some more evidence of what i'm talking about.. without console.log..
var ypos = 5;
setTimeout( function(){
ypos = ypos + 20;
g.drawString("timeout", 5, ypos, 0);
},0);
var x =0;
while ( x < 100000 ) {
x++;
}
ypos = ypos + 20;
g.drawString("final", 5, ypos, 0);
timeout should be printed below final because ypos would be larger if the setTimeout callback ran 'after' the code was parsed and in idle state..
however its not the case and final is printed below (lower on screen == higher ypos value)..
So i take back my last response about it being something related to console..
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.
Some more evidence of what i'm talking about.. without console.log..
timeout should be printed below final because ypos would be larger if the setTimeout callback ran 'after' the code was parsed and in idle state..
however its not the case and final is printed below (lower on screen == higher ypos value)..
So i take back my last response about it being something related to console..