Node.js examples for Array:Array Operation
Clone an array
Array.prototype.clone = function () { //return this.filter(function () { return true }); var arr = []; for (var i = 0, len = this.length; i < len; i++) arr[i] = this[i]; return arr;//w w w .j av a 2 s . c o m }