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.
xxxxxxxxxx
1
const hexNumber: string = '65e5';
2
const intNumber: number = parseInt(hexNumber, 16);
3
4
console.log(intNumber); // 26085
Output:
xxxxxxxxxx
1
26085