Boolean.prototype.constructor === Boolean // -> true
new Boolean() // -> Boolean {false}
Symbol.prototype.constructor === Symbol // -> true
new Symbol() // -> Uncaught TypeError: Symbol is not a constructor
Symbol is not a constructor, nevertheless, it is the value of Symbol.prototype.constructor. This is because, unlike booleans, symbols cant be explicitly boxed.
Symbol
is not a constructor, nevertheless, it is the value ofSymbol.prototype.constructor
. This is because, unlike booleans, symbols cant be explicitly boxed.