Is there a way to use constants in JavaScript?
If not, what\'s the common practice for specifying variables that are used as constants?
In JavaScript, my preference is to use functions to return constant values.
function MY_CONSTANT() { return "some-value"; } alert(MY_CONSTANT());