The Object toLocaleString() method
By Flavio Copes
Learn how the JavaScript toLocaleString() method returns a string representation of an object and accepts an optional locale argument to customize it.
~~~
Called on an object instance, returns a string representation of the object. Accepts an optional locale as argument.
Returns the [object Object] string unless overridden. Objects can then return a different string representation depending on the locale.
const person = { name: 'Fred' }
person.toLocaleString() //[object Object]~~~
Related posts about js: