message  Error  instance property JS Home  <<  JS Reference  <<  Error  <<  message

Description

Contains a message decription of an Error object.

Syntax

Signature Description
anError.messageContains a message decription of an Error object.

Parameters

None.

Examples

The code below displays the message property of the Error object.


var anError = new Error('Our message here');
alert('Error message is: ' + anError.message);

Press the button below to action the above code:

Related Tutorials

JavaScript Advanced Tutorials - Lesson 2 - Errors

JavaScript Basics

JavaScript Basics

JavaScript Intermediate

JavaScript Intermediate

JavaScript Advanced

JavaScript Advanced

JavaScript Reference

JavaScript Entities

Globals

Error

Class Properties
prototype
Instance Properties
constructor
message
name
Class Methods
None.
Instance Methods Getters
toString()
Instance Methods Setters
None.

Statements

Operators