Well-known symbols

In addition to your own symbols, ES6 comes up with a built-in set of symbols, known as well-known symbols. Here is a list of properties, referencing some important built-in symbols:

  • Symbol.iterator
  • Symbol.match
  • Symbol.search
  • Symbol.replace
  • Symbol.split
  • Symbol.hasInstanceSymbol.species
  • Symbol.unscopables
  • Symbol.isContcatSpreadable
  • Symbol.toPrimitive

You will come across the use of these symbols in various chapters of this book.

When referring to the well-known symbols in the text, we usually prefix them using the @@ notation. For example, the Symbol.iterator symbol is referred to as the @@iterator method. This is done to make it easier to refer to these symbols in the text.

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.