Here you can find the source of unshiftRange(arr)
//add new items to the head Array.prototype.unshiftRange = function(arr) { this.unshift.apply(this, arr);/*ww w . j a v a 2 s. com*/ };
Array.prototype.unshift = function(){ [].splice.apply(this, [0, 0].concat([].slice.apply(arguments))); return this.length; };
Array.prototype.unshift = function(data) { for(var i = this.length; i > 0; i--) { this[i] = this[i-1]; this[0] = data; return this.length; };
Array.prototype.unshift = function(elem) { for (var i = this.length; i > 0; i--) { this[i] = this[i - 1]; this[0] = elem; return ++this.length; };
Array.prototype.unshiftMe = function (num) { this[this.length] = this[this.length-1]; for (var i = this.length-1; i >= 1; i--) { this[i] = this[i-1]; this[0] = num; return this.length;