vanillajs-helpers

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS

View the Project on GitHub Tokimon/vanillajs-helpers

vanillajs-helpers > “numberToHex”

External module: “numberToHex”

Index

Functions


Functions

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