The parseInt() function of the Number object accepts a string, parses and returns an integer of the specified radix or base.
Syntax
Its Syntax is as follows
Number.parseInt('0xF', 16);Example
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Number.parseInt('0xF', 16);
document.write(result);
</script>
</body>
</html>Output
15