Primitive Data Types
JavaScript has five primitive data types:
- Undefined
- Null
- Boolean
- Number
- String
Examples
A Boolean is a logical entity that consists of either a true or a false value. An example of one is:
var BooleanValue = true;
A Number is a set of numerical digits that represent a number. Through this tutorial, we'll only use base-10 numbers. An example:
var NumericalValue = 354;
A String is a set of zero or more characters. An example:
var StringValue = “This is a String”;