An instance property belongs directly to one object. In a constructor, assigning a value through `this` creates that property on the new instance. section 7.2.1
That direct placement affects lookup and reuse:
- If an instance and its prototype have properties with the same name, the instance property takes precedence; lookup need not continue to the prototype. section 7.2.1
- Each instance gets its own constructor-created properties, while instances share access to properties on the prototype. Repeated method copies may be worth avoiding when creating many objects. section 7.2.1
Listing 7.3. Observing the precedence of initialization activities
function Ninja(){
this.swung = false; #A
this.swingSword = function(){ #B
return !this.swung; #B
};
}
Ninja.prototype.swingSword = function(){ #C
return this.swung; #C
}; #C
const ninja = new Ninja(); #D
assert(ninja.swingSword(), #D
"Called the instance method, not the prototype method."); #D
The Ninja example contrasts an instance method with a same-named prototype method, making the precedence visible. section 7.2.1



