javascript
JavaScript Fundamentals: Data Types

1 min read
#javascriptTable Of Content
Let's examine Data Types.
Data Types
There are 7 Primitive Data Types
Number: Floating point numbers. Used for decimals and integers
let age = 28;String: A sequence of characters. Used for text.
let firstName = 'Dan';Boolean: A logical type that is either true OR false. Used for making decisions.
let fullName = true;Undefined: An ('empty value') that is taken by a variable and not yet defined.
let happy;Null: An 'empty value'.
let a = null;
console.log(a);
//Output: nullSymbol: A value that is unique and cannot be changed.
let sym = Symbol.for('happy');BigInt: Much larger integers than what the Number type can hold.
let bigInt = 1n;