Node.js examples for Array:Array Operation
Serialization function for the Array datatype
/**//from w ww .j a va2 s . c o m * Serialization function for the Array datatype. It reuses the * other serialization functions to serialize the members of the array. */ Array.prototype.serialize = function() { var result = '<array><data>'; for ( var i = 0; i < this.length; i++ ) { result += '<value>' + this[ i ].serialize() + '</value>'; } result += '</data></array>'; return result; }