Standard built-ins

Symbol.toStringTag

Try the free JavaScript compiler

A string property under this key can change the label from Object.prototype.toString; it does not grant internal slots.

Formal Syntax & Structure

javascript syntaxjavascript
Symbol.toStringTag

Return Value

symbol

The predefined protocol key.

Working Example

Example Snippetjavascript
console.log(Object.prototype.toString.call({[Symbol.toStringTag]:"Item"}));
JavaScript Reference