Consider:
var x = {a:3, b:x};
alert(x.b) ==undefined
Question: why ?
x is a pointer to an object, so x.b should refer
to that same object.
Theoretically:
x --some object containing
a = 3,
b --x
However, this is NOT the case. So why is
x.b "undefined" in JS ?
--j
var x = {a:3, b:x};
alert(x.b) ==undefined
Question: why ?
x is a pointer to an object, so x.b should refer
to that same object.
Theoretically:
x --some object containing
a = 3,
b --x
However, this is NOT the case. So why is
x.b "undefined" in JS ?
--j
Comment