Why is it incorrect to think of variables (and methods) on the prototype as being static? I know that we use the instance to call/change them but if we change them then that change is reflected to all instances and not just the instance itself.
function Calculator() {
// constructor defined
this.add = function(a, b) {
return a+b;
}
}
Calculator.prototype.staticvar = 'hello'
c1 = new Calculator();
c2 = new Calculator();
alert(c1.staticvar + ", " + c2.staticvar) // both hello
Calculator.prototype.staticvar = "hey!"
alert(c1.staticvar + ", " + c2.staticvar) // both change to hey!
Is it the fact that by definition a static variable can be accessed directly with the class, without the need to create a instance becomes the main reason why variables/functions on a prototype object are not considered static?