0

How do I access the array at B? I have tried to console.log .circle["[[Scopes]]"]["0"].B but it says "Cannot read property '0' of undefined".

enter image description here

2 Answers2

1

circle appears to be a function, and what you're looking at there appears to be debug information about the functions prototype.

I don't think you'll be able to get access to those values at runtime.

justin.m.chase
  • 13,061
  • 8
  • 52
  • 100
1

That is showing you debug information about the closures that are available to the function. If you are writing code which is inside the circle function, then you can just type B to interact with that variable. But if you are outside of the circle function, you have no way to access its closures.

Nicholas Tower
  • 72,740
  • 7
  • 86
  • 98