How do you convert decimal values to their hexadecimal equivalent in JavaScript?

30
30

Convert a number to a hexadecimal string with:

hexString = yourNumber.toString(16);

And reverse the process with:

yourNumber = parseInt(hexString, 16);

Leave a Reply

Your email address will not be published. Required fields are marked *