Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert decimal to hex

// function to convert decimal to hexadecimal
function convertToHex(element,index,array) {
   return element.toString(16);
}

var decArray = new Array(23, 255, 122, 5, 16, 99);

var hexArray = decArray.map(convertToHex);
alert(hexArray); // 17,ff,a,5,10,63
Source by www.oreilly.com #
 
PREVIOUS NEXT
Tagged: #convert #decimal #hex
ADD COMMENT
Topic
Name
6+7 =