If you are a beginners or experienced you should know about the primitive data types as it forms the base of any programming language. Let’s get into it and see what are the primitive datatypes that are Supported by JavaScript.
There are 7 primitive data types are there in JavaScript:-
- Null
- Number
- Boolean
- BigInt
- String
- Symbol
- Undefined
To remember the above datatypes we can use the formula as:-
N N B B S S U
// Primitive types of data types in JavaScript // NN BB SS U // null number Boolean BigInt string symbol undefined let a = null // null let b = 55 // Number let c = true //false //Boolean let d = BigInt(100) // BigInt let e = "this is string" //String let f = Symbol('demo example') // Symbol let g = undefined //undefined