Here you can find the source of extend()
Array.prototype.extend = function() { var oCurrentObj = {}; for(var i = 0; i < this.length; i++) {// w w w . j a v a 2 s .c o m oCurrentObj = this[i].extend(oCurrentObj); } return oCurrentObj; }
Array.prototype.extend = function(arr) { this.push.apply(this, arr); return this;
Array.prototype.extend = function(array)
this.push.apply(this, array)
Array.prototype.extend = function(array){ for (var j = array.length-1; j >= 0; j--) this.unshift(array[j]); return this; };
Array.prototype.extend = function(array) { for (var i = 0; i < array.length; i++) { this.push(array[i]);