JS Quiz: Easy: Shared reference mutation surprise

What does this log?

const base = { count: 0 };
const arr = Array(3).fill(base);
arr[1].count = 7;
console.log(arr[0].count, arr[2].count);
  • 0 0
  • 7 0
  • 0 7
  • 7 7
0 voters