JavaScript Data Types


Data types represent the different kinds of values we can use in JavaScript.

There are altogether 8 basic data types in JavaScript.

Data Type Description Example
String Textual data "hello"
Number An integer or a floating-point number 3
BigInt An integer with arbitrary precision 10n
Boolean Any of two values: true or false true or false
undefined A data type whose variable is not initialized let a;
null Denotes a null value let a = null;
Symbol A data type whose instances are unique and immutable let value = Symbol('hello');
Object Key-value pairs of collection of data let student = {name: "John"};