Re: Javascript: don't move!
by Bruce Ure at 16:19 22/03/05 (Forum::Technical Advice::General)
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..

<< View comments Iiyama monitors, quickasyoulik... >>
Powered by
Powered by Novacaster