I can define a class in JavaScript like this:
var appender = function (elements, func) {
this.Prop = something;
staticProp = something_else;
};
Am I right? Well then, how can I create a static field in this class? And how can I access that field inside the class? I mean I want a field that be shared between all instances from the class.
var ap1 = new appender();
var ap2 = new appender();
ap1.Prop = something1;
ap2.Prop = something2;
var t = ap1.Prop == ap2.Prop; // true
ap1.staticProp = something_static;
var s = ap2.staticProp = something_static; // I want to this returns true. how can I?