@the1laztypeof does work? In some earlier builds it didn't, but I fixed it.
In 1v80 you don't get an error if you've not used something before. For instance:
setInterval(function() {
print(i++);
}, 1000);
Will just print NaN I think? Not good.
I'm pretty confident now that in pretty much all cases (apart from the careful on=!on; example code I used to use) the ReferenceError will actually help to point out code that was in error (like Serial1.setup(...,{parity:even});, so hopefully it won't annoy people too much!
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.
@the1laz
typeof
does work? In some earlier builds it didn't, but I fixed it.In 1v80 you don't get an error if you've not used something before. For instance:
Will just print NaN I think? Not good.
I'm pretty confident now that in pretty much all cases (apart from the careful
on=!on;
example code I used to use) theReferenceError
will actually help to point out code that was in error (likeSerial1.setup(...,{parity:even});
, so hopefully it won't annoy people too much!