JavaScript Data Types

Type Example
String"Hello World"
Number10, 3.14
Booleantrue / false
Array[1, 2, 3]
Object{ name: "John" }

💡 Pro Tip: Use typeof to check a variable's type!

Code Implementation:

let name = "John";      // String
let age = 25;         // Number
let isStudent = true; // Boolean

// Advanced Types
let scores = [90, 85]; // Array
let user = {           // Object
  id: 1,
  role: "Admin"
};