answersLogoWhite

0

it is used to convert the string value that we get from the users to integer data type

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
ReneRene
Change my mind. I dare you.
Chat with Rene
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: What is parseint in javascript?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is parseInt in BufferedReader in java?

parseInt() interprets the next available token as an int.


How to convert a string into an integer in javascript?

In C# you can do that in the following way Convert.ToInt32(yourStringHere), for instance Convert.ToInt32("wikianswers"). But not all string can be converted to int type. If it happens compilator will throw the exception converting error which you can handle using structure try { ...//your code } catch (Exception) { ... //your code in the case of the exception }


Program to fnd the biggest of 3 numbers in Java script?

Here is the code: <html> <head> <script type="text/javascript" langage="javascript"> function getHighest() { var a = parseInt(document.getElementById("num1").value); var b = parseInt(document.getElementById("num2").value); var c = parseInt(document.getElementById("num3").value); if((a>b)&&(a>c)) { alert(a+" is the highest number"); } else if((b>a)&&(b>c)) { alert(b+ " is the highest number"); } else if((c>a)&&(c>b)) { alert(c+ " is the highest number"); } else { alert("One of them is not an int"); } } </script> </head> <body> Input a: <input type="text" name="number1" id="num1" /><br /> Input b: <input type="text" name="number2" id="num2" /><br/> Input c: <input type="text" name="number3" id="num3" /><br/> Submit: <input type="submit" name="submit" value="submit" onclick="javascript:getHighest();return false;" /> </body> </html>


What is a javascript tutorial?

A JavaScript tutorial contains instructions that will teach you how to code in JavaScript.


What languages can a browser understand?

HTML, CSS, & JavaScript.