Imagine you want to save a backup of your current team before testing a new lineup. You might try writing const backup = team. Watch out: in JavaScript, assigning an array to another variable does not create a separate copy!
↗️
Loading editor...
↶
↷
You only pushed "Pyrochu" into backup, yet team was modified too! That's because both variables point to the exact same array in memory — they are just two labels for the same data.