I thought there would already be an answer for this but I can\'t seem to find one.. How can I run a particular class method on all instances of this class in Javascript?
You can create a static array and store it on your constructor function:
MyClass.allInstances = []; MyClass.allInstances.push(this);
However, you need some way to figure out when to remove instances from this array, or you'll leak memory.