English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM console.info() Method

 JavaScript Console Object

console.info();The method writes informational messages to the console.

This console can be used for testing or debugging purposes.

Syntax:

console.info(message)
console.info("This is a message...");
Test and see‹/›

Browser Compatibility

The console.info() method is fully supported by all browsers:

Method
console.info();YesYesYesYesYes

Parameter Value

ParameterDescription
MessageString or object to be written to the console

More Examples

This example writes an object to the console:

var myObj = { str: "Some text", id: 12 };
console.info(myObj);
Test and see‹/›

This example writes an array to the console:

var arr = ["Item1", "Item2", "Item3", "Item4"];
console.info(arr);
Test and see‹/›

 JavaScript Console Object