Skip to content

Glossary: JavaScript Beyond the Basics

Cents (storing money in)

Also written: cents

Keeping prices as whole-number cents, such as `1800` for $18, because decimals don't add exactly in JavaScript (`0.1 + 0.2` gives `0.30000000000000004`). You divide by 100 only when you format for display.

Where the book teaches it

Related terms

Intl