But I imagine that the whole primitive values are immutable thing was established much, much earlier—leading to a situation where creating a "constant binding" was easy and relatively cheap in terms of run-time performance.
Facilities for creating immutable objects exist (Object.freeze() which is only shallow) but come with run-time overhead.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
ES2015 (ES6) actually.
But I imagine that the whole primitive values are immutable thing was established much, much earlier—leading to a situation where creating a "constant binding" was easy and relatively cheap in terms of run-time performance.
Facilities for creating immutable objects exist (
Object.freeze()
which is only shallow) but come with run-time overhead.