Javascript Array slice(index)
Array.prototype.slice = function(index) { result = []//from ww w . j av a2 s . c o m if (typeof index != "number") { for (index; index < this.length; index++) { result.push(this[index]) } } return result }