01 / 06
You want more without changing the original
To add an item to an array you have used push. But push rewrites the original array itself.
That is trouble when you want to use the original data later. Wanting both "before adding" and "after adding" happens more often than you would think.
const fruits = ["apple", "orange"];fruits.push("peach");console.log(fruits);Result
["apple", "orange", "peach"]