Wednesday, April 05, 2017

How to convert decimal to hex in JavaScript? - Stack Overflow

How to convert decimal to hex in JavaScript? - Stack Overflow







Convert a number to a hexadecimal string with:
hexString = yourNumber.toString(16);
and reverse the process with:
yourNumber = parseInt(hexString, 16);

No comments: