Engrain by ByteRush

JS.05.05 Mid-level

Symbols and well-known symbols

Comes up in: JavaScript

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • unique keys
  • Symbol.for registry
  • non-enumerable in for…in
  • well-known symbols (iterator, asyncIterator, toPrimitive, toStringTag, hasInstance)

Words you will know

symbolwell-known symbolregistry

What you will practise

  • make an object iterable with Symbol.iterator

Interview questions this answers

  • What are Symbols used for?