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

JavaScript String valueOf() Method

 JavaScript String Object

valueOf()The method returns the original value of the string object.

This method is usually called by JavaScript internally, rather than explicitly called in the code.

Syntax:

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

Browser Compatibility

All browsers fully support the valueOf() method:

Method
valueOf()YesYesYesYesYes

Technical Details

Return Value:A string representing the original value of the given String object
JavaScript Version:ECMAScript 1

 JavaScript String Object