String to Float Conversion in JavaScript

String to Float Conversion in JavaScript
Rating: 5 - 1 Votes

String to Float Conversion in JavaScript

JavaScriptFloats are decimal numbers.  Similar to previous tutorial, if a float number is inside a quotation marks, it is treated as string by JavaScript.  To convert a string to float, we make use of parseFloat() function.  Example is given below.