JAVASCRIPT

Primitive Data Types


 

Primitive Data Types:

Primitive data types are also known as in-build data types which are immutable and  passed by value. There are six primitive data types as follows:

 

1. Numbers

It represents numeric values, such as integers or floating-point numbers.

let age = 23;

 

2. Strings

It represents sequences of characters.

It represents sequences of characters.

 

3. Booleans

It represents either true or false.

let boolValue =false;

 

4. Null

It represents absence of value.

let nullValue = null;

 

5. Undefined

It represents an uninitialized variable or absence of value.

let undefinedValue = undefined;

 

6. Symbols

It repensents a unique identifier.

let syb = Symbol("unique");