I always thought that const variables in JavaScript would be constants... like "variables that cannot change".
So I always assumed the benefit of using const over let/var would be something like decreased resources usage.
But after a quick test it looked like a const pretty much acts like a let-variable. It's block scoped and can be modified... at least in my browser (Firefox 47.0).
Here's what I did:
const FOO = [0,1,2]
FOO[0] = 11
console.log(FOO) // > [11, 1, 2]
And that leads to my question: What is the point of using const? I mean the word is longer, lot's of people don't know of const and it straight up seems to act like a normal variable. So why would I give the illusion that it is not? Why don't we just keep writing constants as let/var with the name in all-caps?