Javascript Data Types
There are two types of data types in JavaScript. JavaScript, also known as ECMAScript specifies six primitive data types and object (or) non-primitive data types

1. Primitive data type
2. Non-primitive (reference) data type

JavaScript has dynamic types. This means that the same variable can be used to hold different data types:
var x;     // Now x is undefined
var x = 10;     // Now x is a Number
var x = "Name";     // Now x is a String
JavaScript primitive data types
There are five types of primitive data types in JavaScript. They are as follows:
Data Type        Description
String String data type represent textual data
Number Numeric data types
Boolean Boolean type can have two value true or false.
Undefined Variables value are undefined.
Null Null specifies variable is declare but values of this variable is empty.
Symbol Symbol data type new (Currently ECMAScript 6 Drafted) used for identifier unique object properties.
JavaScript Non-Primitive data types
The non-primitive data types are as follows:
Data Type        Description
Object Instance through which we can access members
Array Group of similar values
RegExp Represents the regular expression