Capitalization of const variables

When using the “const” keyword you should capitalize the name of the variable instead of using camelCase. we learned that is the “const” overview section. However, it seems to be inconsistent with the part of JavaScript tutorial titled “Create decimal numbers with JavaScript”. When using “const” to create a decimal value for a variable I can’t capitalize the variable name to be “MYDECIMAL” it requires it to be formatted to “myDecimal” in camelCase. Is there something I am missing, or is this just due to how to tutorial is made?

The rule is not USE CONST → AUTOMATICALY SHOUT IN ALL CAPS

Its a bit more like use const for global constant values → SHOUT IN ALL CAPS

Generally you should use const as much as you can, but only use ALL CAPS for global constants.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.