DEV Community

Discussion on: Once and for all: const in JavaScript is not immutable

Collapse
georgecoldham profile image
George

If you want immutability then you need to start using Object.freeze() and Object.seal()

Collapse
valentinogagliardi profile image
Valentino Gagliardi Author

Object.freeze is shallow though :-)

Collapse
itsjzt profile image
Saurabh Sharma • Edited on

So that's why there libraries like Immutable.js, but it would be great if JS has something for making values immutable.