Use "static" variables.
JavaScript doesn't have static variables, but because functions are treated as
objects, you can have a property assigned to the function and it will behave
like a static variable.
http://www.tipstrs.com/tip/1084/Static-variables-in-Javascript
Original issue reported on code.google.com by Dennis.I.89 on 19 Nov 2010 at 2:47
Original issue reported on code.google.com by
Dennis.I.89
on 19 Nov 2010 at 2:47