Too bad the rest of JavaScript doesn’t support immutability (at least, not without the use of a special library). This is one of the reasons many FP purists insist JavaScript is not a functional programming language. It is, at best, a procedural language with some functional and object-oriented capabilities tacked on.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store