How to Avoid Array Mutation
In this article, I’ll focus on showing how to add, edit and remove items in an array causing mutation and non-mutation ways. Some things we need to keep in mind when writing code avoiding mutation is to return a new one after the update. It’s a common approach when working with functional programming and if you want to understand some concepts of functional programming I recommend you read this article I wrote some time ago....