>E.toString("this is a test of string compare")==="this is a test of string compare"
=false
If you used != / == then you'd be fine, but Espruino's doing a 'type compare' and it gets fooled by having a 'flat string' and a string. That's a nasty one - should get a fix in for it soon.
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.
Thanks. It actually boils down to this:
If you used
!= / ==
then you'd be fine, but Espruino's doing a 'type compare' and it gets fooled by having a 'flat string' and a string. That's a nasty one - should get a fix in for it soon.