16. Numbers

In This Chapter

  • Make sense of numbers

  • Learn about the variety of numerical values you will encounter

  • Meet the Math object and the various mathematical things you can do

A large part of your time in JavaScript will be spent dealing with numbers. Even if you aren’t working with numbers directly, you’ll indirectly encounter them when doing even the most basic of tasks such as keeping count of something, working with arrays, etc.

In this chapter, I will introduce numbers in JavaScript by looking at how you can use them to accomplish many common tasks. Along the way, we will dive a little bit beyond the basics to broadly explore some interesting number-related things you might find useful.

Onward!

Using a Number

In order to ...

Get JavaScript Absolute Beginner's Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.