English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript String toString() Method

 JavaScript String Object

toString()The method returns the value of a String (String) object.

Syntax:

string.toString()
var str = "Hello World";
str.toString();
Test and See‹/›

Browser Compatibility

All browsers fully support the toString() method:

Method
toString()YesYesYesYesYes

Technical Details

Return Value:Represents the string of the calling object
JavaScript Version:ECMAScript 1

 JavaScript String Object