Javascript Array toAscStr()

Description

Javascript Array toAscStr()



// [49,50,51] to "123"
Array.prototype.toAscStr = function() {
 var ascStr = new Array();
 for (var i = 0; i < this.length; i++) {
  ascStr[i] = String.fromCharCode(this[i]);
 }
 return ascStr.join("");
};



PreviousNext

Related