Section 1 - Instruction

Let's begin by exploring how JavaScript handles numbers that aren't whole numbers.

Numbers can have decimal points, like 3.14 or 9.99. In programming, these are often called floating-point numbers, or "floats" for short.

Engagement Message

Have you worked with decimals before?

Section 2 - Instruction

In JavaScript, there is only one number data type, which is used for both whole numbers (integers) and numbers with decimals (floats).

Examples include 1.0, 3.14159, or -2.5.

Engagement Message

Do you think the value 100 is the same number type as 100.0 in JavaScript?

Section 3 - Instruction

You can store decimal numbers in variables just like other types:

You can also perform standard math operations (+, -, *, ) with them.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal