JavaScript Object toString() method
returns a string representing this object.
This method is meant to be overridden by derived objects for custom type coercion logic

toString() method returns a string representing this object.

toString() method does not accept any parameter.

toString() method is meant to be overridden by derived objects for custom type coercion logic.

However, objects that inherit from Object may override it with their own implementations that do take parameters ↴

Number.prototype.toString() and

BigInt.prototype.toString() methods for example take an optional radix parameter.

All objects that inherit from Object (except null-prototype objects) inherit the toString() method.

toString() method is used to turn numbers, booleans, arrays and objects into strings.

toString() method converts an object to a primitive value.

Object.toString() always returns the object constructor.

toString() method returns '[object Object]' if it cannot return a string.

[object Object] is the default string representation of an object.

syntax description
return a string representing myValue
myValue.toString()