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