So how do we get immutability in Javascript?
So You Want to be a Functional Programmer (Part 6)
Charles Scalfani
3.5K35

You could also freeze the object:

Object.frees(a);

This does not throw an error when trying to mutate the pointer, but it does not change its value.

Like what you read? Give Melle Hofman a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.