By using parseFloat function we can convert strings to float numbers. To convert string to integer we can use parseInt function. Using this function we can only convert string numbers to numeric data but alphabetic characters we can't convert.
Main use of the parseFloat function is to convert user entered data of a text box to number as by default all the data entered through a text box is string.
Let us try to learn parseFloat function by using one example. Try to enter two numbers in two text fields. The sum of the two numbers will be displayed on click of a button.