Shouldn't the following code output (from console.log()) onInit, foo, bar ?? Instead on onInit, foo ??
It seems that clearInterval is killing the setTimeout? That's not normal is it?
function bar(){
console.log('bar');
}
function foo(){
console.log('foo');
setTimeout(bar, 500);
clearInterval();
}
function onInit(){
console.log('onInit');
setInterval(foo, 500);
}
onInit();
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.
Shouldn't the following code output (from console.log()) onInit, foo, bar ?? Instead on onInit, foo ??
It seems that clearInterval is killing the setTimeout? That's not normal is it?
I'm on PICO: