Skip to content

Glossary: JavaScript Basics

toFixed

Also written: toFixed(2)

A number method that returns a string with an exact number of decimals, such as `(43130 / 100).toFixed(2)` giving `"431.30"`.

Where the book teaches it

Related terms

MathString