EN
TypeScript - convert int to hex
0
points
In this short article, we would like to show how to convert integer numbers to hexadecimal numbers (hex numbers) using TypeScript.
Quick solution:
const intNumber: number = 26085;
const hexNumber: string = intNumber.toString(16); // hex number as string
console.log(hexNumber); // 65e5
Output:
65e5