1

As I'm working with different JavaScript frameworks and libraries (in this case, MapBox.js), when trying to inspect objects and see which properties to manipulate, in Google Chrome DevTools, I see something like the following:

Screenshot Chrome Dev Tools

What are all these properties beginning with underscores? If I wanted to manipulate a property within one of these properties (i.e. _size), is it safe for me to select it using something like e._size.x = 500.

Also, for example, when looking at property _size, what is o.Point? What is __proto__?

Is there anything else important about this I should know?

philip yoo
  • 2,222
  • 4
  • 18
  • 32
  • there is no special meaning to the underscore, it's a wordy letter to JS. __proto__ is special, but you don't need to worry about it for now... – dandavis Oct 20 '15 at 01:48
  • 1
    `o.Point` is just what Chrome console has inferred as the "type" of that object - like `Object`. `Array`, `svg`, or `function ()` on the other properties. The meaning of `__proto__` is [documented](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) – Bergi Oct 20 '15 at 02:18

0 Answers0