Javascript Array toHexStr()

Description

Javascript Array toHexStr()

// [49,50,51] to "313233"
Array.prototype.toHexStr = function() {
 var hexStr = new Array();
 for (var i = 0; i < this.length; i++) {
  hexStr[i] = this[i].toHexStr();// w  w w  . jav  a2 s  .c o  m
 }
 return hexStr.join("");
};



PreviousNext

Related