1

I have an array angles which contains five arrays, each of which contain two numbers.

console.log(angles) reports angles[0] to be [1.5707963267948966, 0.7853981633974483]. Natural conclusion is that I made a mistake in my math somewhere.

console.log(angles[0]) reports the same values as above. However, console.log([angles[0][0],angles[0][1]]) reports [1, 0.5], which is the expected result.

Notably, console.log(angles[0]) reports the erroneous numbers in the expanded result, but the preview displays the correct values.

Screenshot

Issue is not present for angles[n] where n is not 0.

What's happening here? Is there an error in console.log?

snazzybouche
  • 2,241
  • 3
  • 21
  • 51

0 Answers0