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.forregistry- non-enumerable in
for…in - well-known symbols (
iterator,asyncIterator,toPrimitive,toStringTag,hasInstance)
Words you will know
What you will practise
- make an object iterable with Symbol.iterator
Interview questions this answers
- What are Symbols used for?