Home JavaScript Centrality CSS Studio Tools Projects Links
Language Reference Code Examples

JavaScript Data Types

JavaScript can handle a number of different primitive data types, including string data, numeric data, date/time data, and logical/boolean data. A primitive data type can contain only one value at a time.

JavaScript is not a strongly typed language meaning that the data type of a variable does not have to be assigned upon declaration of the variable.

Numbers

The number data type is used to represent numeric data. For a full description, please visit the Numeric Data Type page.

Strings

The string data type is used to represent character data. For a full description, please visit the String Data Type page.

Logical/Boolean

The logical (or boolean) data type is used to represent true/false data. For a full description, please visit the Logical Data Type page.

Null Data

The null data type is a special case. It represents no data--not an empty string, not zero, but literally nothing.

Composite Data (Arrays, Dates, etc.)

For a description of composite data types, please visit the Object Reference page.