Languages
[Edit]
EN

JavaScript - convert int to hex

8 points
Created by:
Dexter
300

In this short article, we would like to show how to convert integer numbers to hexadecimal numbers (hex numbers) using JavaScript.

Quick solution:

// ONLINE-RUNNER:browser;

var intNumber = 26085;
var hexNumber = intNumber.toString(16);  // hex number as string

console.log(hexNumber); // 65e5

See also

  1. JavaScript - convert decimal number to bin, oct, hex, etc. (to any base system) 

JavaScript conversion

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