What are the 5 data types in JavaScript?

Boolean type

Boolean represents a logical entity and can have two values: true and false.

1

Null type

The Null type has exactly one value: null.

2

Undefined type

A variable that has not been assigned a value has the value undefined.

3

Numeric types

ECMAScript has two built-in numeric types: Number and BigInt — along with the corresponding value NaN.

4

BigInt type

The BigInt type is a numeric primitive in JavaScript that can represent integers with arbitrary precision.

5