Met Console Error
# HTML DOM console.error() Method
[ Console Object](#)
## Example
Output an error message to the console:
console.error("This is an error.");
[Try it Β»](#)
* * *
## Definition and Usage
The console.error() method is used to output an error message to the console.
This method is helpful for testing during the development process.
**Note:** During testing with this method, the console needs to be visible (press F12 in the browser to open the console).
* * *
## Syntax
console.error(message)
* * *
## Browser Support
The numbers in the table specify the first browser version that fully supports the method.
| Method | | | | | |
| --- | --- | --- | --- | --- | --- |
| console.error() | Yes | 8.0 | 4.0 | Yes | Yes |
* * *
## Parameter Description
| Parameter | Type | Description |
| --- | --- | --- |
| _message_ | String or Object | Required. An error message, which can be a string or an object. |
* * *
## More Examples
## Example
Use an object as the error message:
var myObj = {name : "", site : "www."}; console.error(myObj);
[Try it Β»](#)
## Example
Use an array as the error message:
var myArr = ["Google", "Taobao", "Tutorial", "Facebook"]; console.error(myArr);
[Try it Β»](#)
[ Console Object](#)
YouTip