My understanding is that things on the prototype chain are only created once per object and that to create instance variables, one must use this
. Is this correct?
For example:
function Foo () {
this.some_instance = "hello";
}
Foo.prototype.some_static = "hi";
Implementation
var foo1 = new Foo();
var foo2 = new Foo();
Making a foo1 and a foo2 will create two values of hello but only one of hi.
Is this correct?