Prototype
noun
say it: “PROH-tuh-type” /ˈproʊtətaɪp/
The object another object is linked to, where JavaScript looks for a property or method when the object doesn't have it itself.
What is Prototype in JavaScript?
Prototype — An object another object consults when a requested property is missing.
const animal = { eats: true };
const dog = Object.create(animal);
In a sentence
- “The describe method isn't stored on each pet; it lives once on the prototype that every pet shares.”
Level: Master · More JavaScript terms at this level
Updated