0

What is actually @@iterator. Is this a symbol literal or something? I see it mentioned in many tutorials but no one seems to explain what kind of animal it is really.

3
  • Might also be of use: stackoverflow.com/questions/29492333/… Commented Dec 29, 2019 at 14:54
  • Thanks but I am still confused, so it is not part of the Javascript Syntax but they still use it widely to refer to the Symbol.iterator symbol constant?! Is that right? Commented Dec 29, 2019 at 15:00
  • 2
    yes, the @@ isn’t part of the JS syntax, it’s more just a notation used by the spec “within this specification a well-known symbol is referred to by using a notation of the form @@name” - ecma-international.org/ecma-262/6.0/#sec-well-known-symbols Commented Dec 29, 2019 at 15:06

1 Answer 1

4

It's Symbol.iterator, a well-known symbol.

The @@ naming is a convention used in the javascript language specification: http://www.ecma-international.org/ecma-262/6.0/#sec-well-known-symbols

Sign up to request clarification or add additional context in comments.

2 Comments

But @@ is this part of the Javascript Syntax at all?
Edited my answer it's just a convention

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.