Syntax
parseInt(string, radix)
parseInt(string)
The parseInt() method is used to convert a string to an integer.
It can take string input with an optional radix input.
The radix input represents the base of the number in the string.
<html>
<body>
<script language="JavaScript">
<!--
document.write("The string 8 converted to an integer is: ");
document.write(parseInt("8") + "<br>");
-->
</script>
</body>
</html>