How to convert a string to float or number in javascript?

 Posted by Rajni.Shekhar on 4/12/2012 | Category: JavaScript Interview questions | Views: 2472 | Points: 40
Answer:

parseFloat() and parseInt() are the function to convert string to float and integer respectively.

Example:

parseInt("123.25");

parseFloat("123.25");


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response