Here you can find the source of setDefault(key, value)
Object.prototype.setDefault = function(key, value) { if (!this.hasOwnProperty(key)) { this[key] = value;// ww w .j ava 2 s . c om } return this[key]; };
Object.prototype.addSibling = function(k, v) { if (typeof this[k] === 'undefined') this[k] = v; return this[k];