Data types and structures

Primitives are the simplest types of data in JavaScript. A primitive literal is a value, with no wrapper or properties of its own. Primitive literals are immutable, meaning they can't be changed to represent other values in the same way that JavaScript's more complex object-based data structures can. For example, while the value of a variable named theTruth can be reassigned a value of false, the boolean literal true can never represent any value other than true, in the same way the number literal 5 can never represent the value of another number.

There are seven primitive data types:

For information about more complex data types, see Variables.