Last active
April 29, 2023 22:07
-
-
Save kistaaa/09ab7fff8853c81a3590633c26aa61bd to your computer and use it in GitHub Desktop.
JS numbers to HEX and reverse
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
const hex = (num) => num.toString(16).padStart(2, '0') | |
const num = (hex) => parseInt(hex, 16) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment