The [[Prototype]] Internal Slot
What you'll learn: How JavaScript stores the prototype connection inside every object using a special hidden property.
What Is the [[Prototype]] Internal Slot?
Every JavaScript object has an internal slot called [[Prototype]] (written with double square brackets). This is a hidden, internal property that stores a reference to another object—or null. You can't access it directly by name like a regular property.
Think of [[Prototype]] as a secret pointer inside every object. It's how JavaScript actually maintains the prototype chain you learned about earlier. When you create an object, JavaScript automatically sets this internal slot to point to some prototype object.
Why "Internal Slot"?
The term "internal slot" means it's part of JavaScript's internal mechanics—not a property you can read or write using normal dot notation or bracket notation. You've already learned how to access what it points to using Object.getPrototypeOf() or the __proto__ accessor, but those are interfaces to the internal slot, not the slot itself.
const obj = {};
// You CANNOT do this:
// obj.[[Prototype]] // ❌ Syntax error
// You access it through methods:
Object.getPrototypeOf(obj); // ✅ Returns what [[Prototype]] points to
The Notation Matters
When you see [[Prototype]] written in documentation, those double brackets signal "this is internal to the JavaScript engine." It's JavaScript's way of saying "here's what's happening under the hood, but you can't touch it directly."
Key Takeaway: Every object contains a hidden [[Prototype]] internal slot that stores a reference to another object or null, forming the foundation of JavaScript's prototype chain.