You can call `Object.freeze()` if you want immutable properties.
const foo = {bar: 1}
The only thing const about it is the reference `foo` cannot be reassigned: foo = something_else; // error
Unlike `const` in C++, `const` in javascript in not very useful in my opinion. `let` is shorter and more readable.Even that is only true for shallow objects
Const is probably only meant for constants like the name suggests.
I think something like this is pretty safe from reassigning:
If you want more control over your properties, you can use the ES5 feature "defineproperty" where you can set writeable: false