Prev Demo
JavaScript
>
Parse Integer
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to parse an Integer.</p> <input type="button" onclick="myParsing()" value="Parse"> <p id="myId"></p> <script> function myParsing() { var A = parseInt(15) + "</br>"; var B = parseInt("15") + "</br>"; var C = parseInt("1.55") + "</br>"; var D = parseInt("1.2 1.3 1.4") + "</br>"; var E = parseInt("1 2 3") + "</br>"; var F = parseInt("it's only RS.10") + "</br>"; var G = parseInt("I spent 5 days") + "</br>"; var H = parseInt("015") + "</br>"; var I = parseInt("15", 15) + "</br>"; var J = parseInt("15", 10) + "</br>"; var K = parseInt("1*15") + "</br>"; var L = parseInt("12", 17) + "</br>" var R = A + B + C + D + E + F + G + H + I + J + K + L; document.getElementById("myId").innerHTML = R; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output