Affiliate link
JavaScript - Data Types
JavaScript has three primitive data types - Number, String, and Boolean.
- Number
- Integer
- BigInt (Big Integer)
- Float
- String
- Boolean
Other data types :
- undefined
- null
- Object
- Symbol
Number
JavaScript number data types are integer, big integer, and float.
let a = 123; // Integer
let b = BigInt(12345ln); // Big Integer
console.log(typeof 1n === 'bigint') // true
console.log(typeof BigInt('1') === 'bigint') // true
let c = 12.345; // FloatString
let a = "This is a string.";
let b = 'Learn JavaScript';
Affiliate link
Affiliate link




