How to Immutably Update Arrays

This lesson covers how to do immutable updates on arrays in a few different ways:

  • Adding an item to the beginning or end
  • Adding an item to the middle
  • Removing an item with `filter`
  • Changing one or more items with `map`

Here is the before and after code for this lesson.

Make sure to do the exercises in the next lesson to try writing this kind of code on your own.