JavaScript Error message Property
Clash Royale CLAN TAG#URR8PPP
<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]-->
JavaScript Error message Property
❮ JavaScript Error Reference
Example
Return an error message (we have written "alert" as "adddlert" to
deliberately produce an error):
try
adddlert("Welcome guest!");
catch(err)
document.getElementById("demo").innerHTML = err.message;
<!--
The result (depending on the browser) could be:
adddlert is not defined
Try it Yourself »
Definition and Usage
The message property sets or returns an error message.
Tip: Also see the name property of the Error object.
Browser Support
Property | |||||
---|---|---|---|---|---|
message | Yes | Yes | Yes | Yes | Yes |
Syntax
errorObj.message
Technical Details
Return Value: | A String, representing a description of an error (varies depending on the browser) |
---|---|
JavaScript Version: | 1.0 |
❮ JavaScript Error Reference