HTML DOM console.info() Method
Definition and Usage
The console.info() method writes a message to the console.
Tip: When testing the console methods, be sure to have the console view visible (press F12 to view the console).
Browser Support
The numbers in the table specify the first browser version that fully supports the method.
Method | |||||
---|---|---|---|---|---|
console.info() | Yes | 8.0 | 4.0 | Yes | Yes |
Syntax
console.info(message)
Parameter Values
Parameter | Type | Description |
---|---|---|
message | String or Object | Required. The message or object to write in the console |
More Examples
Example
Using an object as the message:
var myObj = { firstname : "John", lastname : "Doe" };
console.info(myObj);
Try it Yourself »
Example
Using an array as the message:
var myArr = ["Orange", "Banana", "Mango", "Kiwi" ];
console.info(myObj);
Try it Yourself »