Error.prototype.message

The error message string.

Syntax

message

Examples

let err = new Error("test error")
err.message
"test error"