Custom JavaScript Constants Code Snippet

JavaScript Constants Although there actually are constants in some environments, e.g. in Firefox you can use const instead of var, in general in JavaScript there are no constants. Workaround To work around that limitation, people often use ALL CAPS to denote “hey, don’t touch this var, it’s meant to be a constant”. It’s constant-by-convention but the values can be changed.

Leave a Reply

Your email address will not be published. Required fields are marked *