Javascript Object toArray()

Description

Javascript Object toArray()



Object.prototype.toArray = function toArray() {
 var array = [];//from   w ww  . ja  va2 s  . c om
 for(var i = 0; i < this.length; i++) {
  array.push(this[i]);
 }
 return array;
}



PreviousNext

Related