Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS
vanillajs-helpers > “numberToHex”
► numberToHex(num: number
): string
Defined in numberToHex.ts:15
Convert a number to a Hexadecimal representation (eg. 180 => b4)
numberToHex(180); // -> 'b4'
Parameters:
Param | Type | Description |
---|---|---|
num | number |
Number to convert |
Returns: string