Array


How to CRUD an Array in JavaScript

There are two ways to create, update, and delete items to an array in JavaScript. The first approach is by using the mutable methods which will change the array itself.

The second approach is by using the immutable methods, which will return a new array that contains a new updated value. This could be very useful if your using Redux or changing component state in React.

Let’s say we have an array that contains a few items.

Read more