Ok, a bunch of these are now fixed. Your bug with for (i in foo) is actually to do with the way the Web IDE sends data to Espruino. We've got a bug open for it, and there's another one open in Espruino itself.
If you write it in the console it's much more obvious what the problem is, because as you hit enter after the first line, Espruino executes it.
if (false)
console.log("No!");
if (false)
{
console.log("No!");
}
Both print No!, but the following work:
if (false) console.log("No!");
if (false) {
console.log("No!");
}
And the Web IDE does basically just paste code into the console, when it ought to do something a bit more interesting.
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.
Ok, a bunch of these are now fixed. Your bug with
for (i in foo)
is actually to do with the way the Web IDE sends data to Espruino. We've got a bug open for it, and there's another one open in Espruino itself.If you write it in the console it's much more obvious what the problem is, because as you hit enter after the first line, Espruino executes it.
Both print
No!
, but the following work:And the Web IDE does basically just paste code into the console, when it ought to do something a bit more interesting.