Javascript – Immutable types
In C# and other similar general purpose languages, there are access modifiers which allow you to specify whether a particular property can be accessed/modified by everyone (public), only subclasses (protected) or only from within the same class (private). In these languages, creating an immutable type usually involves: making all properties publicly gettable making all properties …