Data Types in JavaScript

In this tutorial, we will learn about Data Types in JavaScript. Data Type of a variable simply tells us what kind of data that variable can store and how much size of data it can hold. Java Script provides us with a variety of Data Types we will learn about these data types.

Primitive data types:

Data TypeDescription
StringRepresents sequence of characters e.g. “hello”
NumberRepresents numeric values e.g. 100
BooleanRpresents boolean value either false or true
UndefinedRepresents undefined value
NullRepresents null i.e. no value at all

Non-primitive data types:

Data TypeDescription
ObjectRepresents instance through which we can access members
ArrayRepresents group of similar values
RegExpRepresents regular expression
Spread the love