So I have these few lines of code:
  console.log(...cells);
  let testCells = [...cells];
  testCells[index].shape = selectedShape;
  testCells[index].player = player;
  console.log(...cells);
The interesting thing is that it is console.log()ing back the following.
I don't quite get it, why does cells change? There is no other part of the code that could interfere with cells. Any tips?

 
    