Immutability is one of the building blocks of functional programming. It allows you to write safer and cleaner code. I’ll show you how you can achieve immutability through some JavaScript examples. Arrays are a good starting point to get a grasp of how immutability actually works.