Skip to content

Instantly share code, notes, and snippets.

@milksense
Created June 4, 2021 05:01
Show Gist options
  • Save milksense/1af809a293dbabbc22ee95710d6603cc to your computer and use it in GitHub Desktop.
Save milksense/1af809a293dbabbc22ee95710d6603cc to your computer and use it in GitHub Desktop.
Decimal to Hexadecimal converter
const hex = (e: number): string => '0x' + e .toString(16);
/* Usage: console.log(hex(255)) */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment