I am reading the MDN and ES6 specs definition of Symbol.toStringTag but don't quite get what it means. Is it supposed to be thought of as:
- If the
toString()
method of an object or a class is defined, then the@@toStringTag
is irrelevant. (Unless if the self-definedtoString()
uses@@toStringTag
, but in what way?) - Otherwise,
Object
'stoString()
will use the function referred to by[Symbol.toStringTag]
to obtain an object name to display as[Object XYZ]
?