HTML DOM console.info()Method

Console 对象Console Object

Example

Output information on the console:

console.info("Hello Example!");

Try it Yourself »

Definition and Usage

The console.info() method is used to output information to the console.

This method is very helpful for testing during the development process.

Tip:When testing this method, the console must be visible (press F12 in the browser to open the console).


Syntax

console.info(message)

Browser Support

The numbers in the table indicate the first browser version that supports the method.

Method
console.info() Yes 8.0 4.0 Yes Yes

Parameter Description

Parameter Type Description
message String or Object Required. The information to display on the console.

More Examples

Example

Use an object as the output information:

var myObj = { name : "Example", site : "www.example.com" }; console.info(myObj);

Try it Yourself »

Example

Use an array as the output information:

var myArr = ["Google", "Taobao", "Example", "Facebook" ]; console.info(myArr);

Try it Yourself »

Console 对象Console Object

Other Extensions