Run ❯
zig
.
com
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Global Methods</h1> <h2>The parseInt() Method</h2> <p>parseInt() parses a string and returns the first integer:</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = parseInt("10", 10) + "<br>" + parseInt("010") + "<br>" + parseInt("10", 8) + "<br>" + parseInt("0x10") + "<br>" + parseInt("10", 16); </script> </body> <!-- /jsref/tryit.asp?filename=tryjsref_parseint1 Thu, 06 Feb 2025 18:35:42 GMT --> </html>