I need to have a constant variable, one that can't be changed. in my javascript scripts...
this works, but when I attempt to access the constant through a function, then the scope of the constant doesn't seem to extend to functions.Code:const USER_ID = 10;
How do I make the constant global to all functions?







, but I'm just joking around. I do see your point. Like kyberfabrikken said earlier, it is just not possible to implement "const" with Javascript. I guess we'll just have to wait for everyone to start using spidermonkey and rhino

Bookmarks