8

In the context of ES6 symbols, it's often seen that double at sign (@@) is placed before a symbol name. Is it just another way to reference a built-in symbol? However, using it in code causes

SyntaxError: Invalid or unexpected token

Soviut
  • 88,194
  • 49
  • 192
  • 260
themefield
  • 3,847
  • 30
  • 32

1 Answers1

5

This has been answered before: What does @@ ("at at") mean in ES6 JavaScript?

I am gonna leave this article here too: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols

A summary quote from the spec:

Well-known symbols are built-in Symbol values that are explicitly referenced by algorithms of this specification. They are typically used as the keys of properties whose values serve as extension points of a specification algorithm. Unless otherwise specified, well-known symbols values are shared by all Code Realms (8.2).

I hope this answers your question :)

Max
  • 1,526
  • 2
  • 16
  • 19