Open this example in the interactive library
Source code
console.log((255).toString(16), Number.parseInt("ff", 16));
Sample output
ff 255

Open this example in the interactive library
console.log((255).toString(16), Number.parseInt("ff", 16));
ff 255