What is the difference between dot notation and bracket notation?

Beginner

Answer

Dot notation: Used with valid identifiers
Bracket notation: Used with dynamic keys, spaces, or special characters

const obj = { name: "John", "full name": "John Doe" };
obj.name;           // Dot notation
obj["full name"];   // Bracket notation
obj[variable];      // Dynamic access