const MY_CONSTANT = "some-value";
With const, you can declare local variables with block scope rather than function scope. Let’ say we have a constant variable a. After declaring a value like a constant variable, you can’t assign a new value to it.
// declared ‘a’ as a constant variable. const a = 150; // Assigning a new value to `a` will fail since ‘a’ is a constant variable a= 0; a++; // The below declarations won’t work var a = 0;