Skip to main content Accessibility Feedback

Numbers

parseFloat()

Convert a string into a point number (a number with decimal points).

// returns 3.14
parseFloat('3.14');

// also returns 3.14
parseFloat('3.14someRandomStuff');

// returns 3
parseFloat('3');

Works back to at least IE6.