In the intro to the const keyword, the coding tutorial rather oft-handedly mentions that constants should be capitalized. This is then inconsistently enforced in the following challenges. Either more should be said about why some const variables are in all caps while others are not, or the capitalization requirements should be removed.
Yeah, the idea that constants should be capitalized is an older standard. For example:
const NUMBER_OF_STATES = 50;
But that is often not enforced. It’s also a little confusing in JS because objects and arrays that are declared as
const may not seem to behave like a constant. For example:
const myArr = [1, 2, 3]; myarr = 5;
This is perfectly legal and normal in JS. It works for reasons that are too complicated to explain here. (Suffice it to say, it works with non-primitive types and is perfectly rational if you understand how data and addresses work.)
But FCC a volunteer program. If you feel the curriculum should be changed, you can comment on the repo or even change it yourself and make a pull request. This is the forum where we mostly discuss the how of the curriculum, not debate why.