I’m looping through some data and updating an array based on the data.
I might want to update only a specific item in the array.
I know how to find that array’s index.
I know how to update the variable by writing that index in the dot notation.
But that only works if I literally write in the number myself. I can’t figure out how to find the index, save it as a variable, and then call that variable so that it dynamically updates the right item.
Anyone have any thoughts?
This doesn’t work: