Copyright 2025

The Valley of Code

A Flavio Copes project

The String toString() method
Find out all about the JavaScript toString() method of a string

Returns the string representation of the current String object:

const str = new String('Test')
str.toString() //'Test'

It’s same as valueOf().


Want to master TypeScript? Check out my TypeScript Masterclass

Join my AI Workshop !

The Web Development BOOTCAMP cohort starts in February 2026