A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Error/toString below:

toString ยท WebPlatform Docs

toString Summary

Returns a string representation of an error.

Syntax
error.toString()
date
Required. The error to represent as a string.
Return Value

Returns "Error: " plus the error message.

Examples

The following example illustrates the use of the toString method with an error.

var myError = new Error();
 myError.message = "My Error";
 var errorString = myError.toString();
 document.write(errorString);

 // Output: Error: My Error
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4