Prototype & Prototypal Inheritance
What is a prototype in JavaScript?
In JavaScript, a prototype is an object from which other objects inherit properties and methods. Key characteristics: 1) Every JavaScript object has a prototype (except the base Object.prototype), 2) The prototype itself is an object that serves as a fallback source for property lookups, 3) It creates an inheritance chain allowing objects to access properties they don't directly contain, 4) It's the foundation of JavaScript's prototypal inheritance model, 5) Accessed via Object.getPrototypeOf() or the deprecated __proto__ property, 6) Enables memory-efficient method sharing across all instances.