[First this question may be taking about same concept as How does JavaScript .prototype work?, but has different context.]
I came across this blog which states:
In JavaScript, each object has a property called “prototype”. An object’s prototype allows us adding properties to all instances of that object (even to the existing instances).
As per my understanding so far, the above statement is confusing for beginners as it does not distinguish between "prototype" and "[[Prototype]]". Not all objects have a prototype
property, for example:
var myobject = {};
myobject.prototype; // Undefined
I think it would be better if we say:
In JavaScript, each object has an internal property called “[[Prototype]]” that can be seen in some browsers by accessing the non-standard property called “__proto__”. An object’s prototype allows us adding properties to all instances of that object (even to the existing instances). Only functions (hence constructors) have ‘prototype’ property to set that allows us adding properties to all instances of that object made by that function/constructor.
Is this a more accurate description of JavaScript prototypes, or am I missing something? Thanks in advance.