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);//trueWritten by Ron Apelbaum
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#