Once you've added data to your collection, you'll probably need to change it. Lists and maps each have two approaches to change existing values.
Changing collection values
Changing list values
Lists can either set a value or update a value. The distinction is subtle, so let's compare the two approaches now.
Setting list values
When you set list values using the set() method, you're changing an existing value. More specifically, you're overwriting the current value at a given index with a new value:
const myList = List.of(1);
const myChangedList...