You can use the Number
function, which parses a string into a number according to a certain format.
console.log(Number("0xdc"));
JavaScript uses some notation to recognize numbers format like –
0x
= Hexadecimal0b
= Binary0o
= Octal
You can use the Number
function, which parses a string into a number according to a certain format.
console.log(Number("0xdc"));
JavaScript uses some notation to recognize numbers format like –
0x
= Hexadecimal0b
= Binary0o
= Octal