Copyright 2025

The Valley of Code

A Flavio Copes project

The Object toString() method
Find out all about the JavaScript toString() method of an object

Called on an object instance, returns a string representation of the object. Returns the [object Object] string unless overridden. Objects can then return a string representation of themselves.

const person = { name: 'Fred' }
person.toString() //[object Object]

Want to master TypeScript? Check out my TypeScript Masterclass

Join my AI Workshop !

The Web Development BOOTCAMP cohort starts in February 2026