Node.js examples for Array:Array Operation
Implode array
Array.prototype.implode = function (s) { var string = ''; for (var i = 0; i < this.length; i ++) { //from w w w . j a v a 2 s . c o m string += this[i] + s; } var regexp = new RegExp(s + '$', 'ig'); return string.replace(regexp, ''); }