90.3k views
0 votes
Does anyone know anything about hexadecimal number for JavaScript programming?

User Holian
by
6.4k points

1 Answer

3 votes
Convert a number to a hexadecimal string with:

hexString = yourNumber.toString(16);
and reverse the process with:

yourNumber = parseInt(hexString, 16);

If it's not right I'm sorry. I'm pretty sure it's right tho. Hope it helped
User Padi
by
6.8k points