Last Updated: February 25, 2016
·
148
· apelbaur

undefined object property

If you try to access a non-existing property of an object you'll get undefined:

var A = {};
console.log(A.a);//undefined
console.log(A);//Object {}

but you can put undefined as a member in the object

A.a = undefined;
console.log(A.a);//undefined
console.log(A);//Object {a: undefined}

note that it is still really undefined:

console.log(A.a===A.b);//true