links: JS MOC
Symbol is a special-purpose value that behaves as hidden unguessable value
Symbols are almost exclusively used as special keys on objects
Example:
let sym1 = Symbol()
let sym2 = Symbol('foo')
🚫 Common Pitfalls to avoid:
let sym = new Symbol()
you can’t use new keyword for primitive types
tags: javascript