Create immutable objects in Javascript