Data Types and Arithmetic Operators
Explore JavaScript primitive data types such as boolean, number, string, null, undefined, bigint, and symbol. Learn how to apply basic arithmetic operators including addition, subtraction, multiplication, division, modulus, and exponentiation. Understand floating point behaviors, the concept of NaN, and how JavaScript handles infinity values.
We'll cover the following...
Introduction
Most programming languages help you create values that symbolize a number, a character in a text, or a longer text. You can also symbolize the concept of true and false values using booleans. You can also create values that symbolize the absence of a value. These values are all called primitive datatypes.
The name primitive does not come from a negative place. These datatypes are not inferior to any other data types we use in JavaScript. The name primitive comes from their simplicity. The other datatypes you will learn later are composite, and they consist of many primitive ...