Javascript Object addSibling(k, v)

Description

Javascript Object addSibling(k, v)

Object.prototype.addSibling = function(k, v) {
 if (typeof this[k] === 'undefined') this[k] = v;
 return this[k];/*from   w  ww. jav  a 2s .com*/
}



PreviousNext

Related