Languages
[Edit]
EN

TypeScript - convert int to hex

0 points
Created by:
Paluskitten
356

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

Alternative titles

  1. TypeScript - convert int to hexadecimal
  2. TypeScript - convert dec to hex
  3. TypeScript - convert decimal to hexadecimal
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join