JS Built-ins
SymboltoPrimitivebeginner

Symbol.toPrimitive β€” typeof is always symbol

πŸ“– Usage Example
typeof Symbol.toPrimitive            // β†’ 'symbol'
Symbol.toPrimitive === Symbol.toPrimitive  // β†’ true

Symbol.toPrimitive is always a symbol primitive with a stable identity.

Symbol.toPrimitive Type

Regardless of what hint an object uses, Symbol.toPrimitive itself is always a symbol.

Challenge: Confirm the type once more.

πŸ’‘ Hints (1)
  • β€’ Well-known symbols always have type "symbol".