# parseFloat()

A function that reads a decimal number from the beginning of a string.

## What does **parseFloat()** do in JavaScript?

**parseFloat()** — A function that reads a decimal number from the beginning of a string.

```javascript
const price = Number.parseFloat("4.50 dollars");
```

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary/subjects/javascript/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/parsefloat
