ARTICLE AD BOX
Technically arrays can be both constant and mutable in JS. When an array is declared like const myArray = [], the array can still be modified like myArray.push('Fred'), even though you can't reassign like myArray = {name: 'Fred'}. (note the = assignment operator).
The way to prevent yourself (or someone else) from reassigning the values later is to pass the completed array to Object.freeze().
If the purpose is to flag the value as a constant your code editor, your code editor would have to be pretty smart. This technique probably won't help with that.
If the purpose is to leverage the superior performance of const, you're likely optimizing too early. JS engines in browsers are highly optimized already; applying your own micro-optimizations is more likely to make your own life difficult than it is to make the engine faster.
