Nah mate. I want:
function bum() {
static var bumCount = 0;
bumCount++;
alert('bum() has run ' + bumCount + ' times);
}
To get round it I can define bumCount with wider scope but it's a bit messy.
If Javascript doesn't support statics there must be a good reason..
|