Is there a way to use constants in JavaScript?
If not, what\'s the common practice for specifying variables that are used as constants?
The const keyword is in the ECMAScript 6 draft but it thus far only enjoys a smattering of browser support: http://kangax.github.io/compat-table/es6/. The syntax is:
const
const CONSTANT_NAME = 0;