What Are Variables Starting With Capital Letters?

Example:

var DEX01 = “NULL”;

In this instance, the text “DEX01” is green or teal-colored, which must mean that it works differently than regular variables, denoted in purple.

What does this “green” or “teal-colored” mean, and how is the variable different from other variables?

Also, can you tell me how this type of variable is used?

Thank you so much.

It doesn’t work differently.
It’s a matter of convention (but it will work well even if you don’t follow the convention).
the convention for JS is that variable starts with a lowercase letter and written as camel case ( let myFirstVar = val; ).
Classes and constructers start with an uppercase letter ( class MyFirstClass{} )
and there’s also a common convection to use all caps for constants ( const MY_CONST = 5; )
The latter is what you were asking about.

Thank you for this. I wonder why the editor uses different colors? Perhaps to denote classes, constructors, etc? I’ll have to look those up.

If you follow the convention, different colors make it clearer. You can see in aa quick glance that it’s (for example) a class and not a variable.