Hint
new binding: each call creates a new object. Own properties are per-instance. Prototype properties are shared across all instances.
function Animal(name) {
this.name = name;
this.type = 'animal';
}
Animal.prototype.speak = function() {
return this.name + ' speaks';
};
const a = new Animal('Leo');
const b = new Animal('Mia');
console.log(a.name);
console.log(b.name);
console.log(a.speak());
console.log(a.type === b.type);
console.log(a.speak === b.speak);Leo Mia Leo speaks true true
Explanation: new creates fresh objects, each with own name and type properties. prototype methods are shared — a.speak === b.speak is true (same function reference on the prototype).
Key Insight: new binding: each call creates a new object. Own properties are per-instance. Prototype properties are shared across all instances.