14

When listing properties of an object in the Chrome console, I stumbled upon notations I had never seen before. Indeed, some properties were outlined with <angle-brackets-properties> and the [[double-square-brackets-properties]] notations. Could anyone shed some light on:

  • What these notations are for
  • What are the implications in terms of behaviour/modifiers of these properties (enumerable, writable, configurable, etc)
  • Whether this can be reproduced by pure Javascript operations, or if this is can only be achieved through native C++ objects
  • When this was introduced (ECMAScript spec)

You will find an example below: enter image description here

Philippe Hebert
  • 1,616
  • 2
  • 24
  • 51

1 Answers1

6

Most of what you're asking is answered here. Just like that answer I'll go ahead and quote the spec:

They are defined by this specification purely for expository purposes. An implementation of ECMAScript must behave as if it produced and operated upon internal properties in the manner described here. The names of internal properties are enclosed in double square brackets [[ ]]. When an algorithm uses an internal property of an object and the object does not implement the indicated internal property, a TypeError exception is thrown.

PEsteves
  • 196
  • 1
  • 5