Created
November 23, 2016 16:04
-
-
Save agirorn/0e740d012b620968225de58859ccef5c to your computer and use it in GitHub Desktop.
Convert decimal to hex in JavaScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dec2hexString(dec) { | |
return '0x' + (dec+0x10000).toString(16).substr(-4).toUpperCase(); | |
} |
kenshin1102
commented
Jan 20, 2021
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment