Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone know how to make static variables in JavaScript?

Status
Not open for further replies.

thoms314159

Technical User
Apr 8, 2003
13
0
0
CA
As the subject says.... Thanks in advance. Jon
 
Do you mean variables than can never be changed - like constants?

If you do, then AFAIK, this cannot be done.

Why don't you just simply declare a global variable, assign a value to it, and never overwrite that value?

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top