This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

valueOf

Summary

Returns the value of a string.

Syntax

string.valueOf()

Return Value

Returns the string value.

Examples

In the following example, the string object is the same as the return value.

var str = "every good boy does fine";
var strStr = str.valueOf();

if (str === strStr)
document.write("same");
else
document.write("different");

// Output:
// same

Attributions

  • Microsoft Developer Network: Article