Node.js examples for Array:Array Value
Take value from Array
Array.prototype.take = function (count) { var items = new Array(); for (var i = 0; i < this.length && i < count; i++) { items.push(this[i]);/*from w w w . j a va 2 s. com*/ } return items; };