10. JavaScript Objects

// 1. Creating an Object
let user = {
  name: "John",
  age: 25,
  isStudent: true
};

// 2. Accessing Property
console.log(user.name); // Output: John
                
Key: "name" | Value: "John"
Key: "age" | Value: 25

The Data Record

An **Object** is a collection of related data. Unlike Arrays (which use numbers), Objects use **Keys** to identify information.

Dot Notation: The most common way to get data out of an object is using a period (.), such as user.age. It makes the code very easy to read.