Ic. foo.xy has - as expected - to fail when foo is undefined - and it obviously did not pre 2v00; but I expect foo.xy and foo["xy"] to return undefined with foo defined and xy in foo undefined or having the value undefined and being interpreted as falsy in an conditional expression (foo.xy) or (foo["xy"]). I assume all is just fine - have to fix my 'paranoia'... ;-) - Will do that with some validation and bringing my understanding up to date.
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.
Ic.
foo.xy
has - as expected - to fail when foo is undefined - and it obviously did not pre 2v00; but I expectfoo.xy
andfoo["xy"]
to returnundefined
with foo defined and xy in foo undefined or having the value undefined and being interpreted asfalsy
in an conditional expression(foo.xy)
or(foo["xy"])
. I assume all is just fine - have to fix my 'paranoia'... ;-) - Will do that with some validation and bringing my understanding up to date.