0

enter image description here

Could someone explain this behavior of console.log in Chrome's dev tool? If instead of logging x I return it, I get the results you'd expect. Is this simply a bug?

EDIT:

function demo() {
  var x = [[1,1],2,3]
  console.log(x)
  console.log(x)
  console.log(x[0])
  x[0] = 42
}
user2651804
  • 1,464
  • 4
  • 22
  • 45

0 Answers0