Node.js examples for Array:Array Operation
Map array element one by one
Array.prototype.map = function (handler) { var result = [] for (var i = 0; i < this.length; i++) { result.push(handler(this[i]))//from w w w . j av a2 s .co m } return result }