< Back to JavaScript notes

Data Types

The basic types of data in JavaScript


All data in computers can be reduced to bits, positive/negative charges expressed as ones and zeros.

In JavaScript, groups of bits are represented as values. You create them by simply invoking their name. There’s several types:

Type Coercion is when operators are applied to the wrong value types and quickly convert the value to what is needed, such as converting "5" from a string to 5 as an integer. To test for any unexpected type conversions or missing values, use the === and !== comparison operators.