Numbers — primitive type

As the name implies, a number type refers to numerical values. Numbers can be divided into two groups:

  1. floating-point — are fractional numbers such as 2.45, -3.58, and .97
  2. Integers — are whole numbers such as 245, -480, and 3.

Unlike programming languages such as C++, and Java, the number type in JavaScript include both floating-point and integer values. Integers, in JavaScript, can span in the range of -253 to 253 and floating-point values can be as high as ±1.7976*10308 and as low as ±2.2250*10-308.