Our website would like to use cookies to store information on your computer. You may delete and block all cookies from this site, but parts of the site will not work as a result. Find out more about how we use cookies.

Login or Register

Powered by
Powered by Novacaster
 
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... >>
View Comments (Flat Mode) Printer Version
Javascript: don't move! Bruce Ure - 22/03
    Re: Javascript: don't move! Simon - 22/03
       Re: Javascript: don't move! Bruce Ure - 22/03
          Re: Javascript: don't move! Simon - 22/03
             Re: Javascript: don't move! Simon - 22/03