JavaScript String toString()
Example
Return the value of a string:
let str = "Hello World!";
str.toString() // Returns "Hello World!"
Try it Yourself »
Definition and Usage
The toString() method returns the value of a string.
Browser Support
toString() is fully supported in all browsers:
| Chrome | IE | Edge | Firefox | Safari | Opera |
| Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
string.toString()
Parameters
| None. |
Technical Details
| Return Value: | A String, representing the value of a string |
|---|---|
| JavaScript Version: | ECMAScript 1 |

