Prototype Chain & Own-Property Basics
Prototype chain basics; check own vs inherited properties; use Object.create; set simple descriptors.
Intro to prototypes
Goal: See how objects inherit through the prototype chain and how to tell own vs inherited keys.
- Prototype chain
- hasOwn vs in
- Object.create
- Basic descriptors

Prototype lookup
If a key is not found on the object, JavaScript looks at its prototype (e.g., Object.prototype).
// A simple object
const user = { name: "Ayla" };
// The prototype is another object used for fallback lookups
const proto = Object.getPrototypeOf(user);
console.log("name:", user.name);
console.log("has toString?", typeof user.toString === "function");
console.log("proto same as Object.prototype?", proto === Object.prototype);

All lessons in this course
- Prototype Chain & Own-Property Basics
- Class Syntax (Preview): constructor, methods, static, extends