Skip to main content
Version: 4.0.1

Error.prototype.toString()

The toString() method returns a string representing the specified Error object.

Syntax​

toString()

Return value​

A string representing the specified Error object.

Description​

The Error object overrides the Object.prototype.toString() method inherited by all objects.