console.info
Prints an informational message.
Available since: Web API
Syntax
console.info(...values)Parameters
| Parameter | Type | Description |
|---|---|---|
| ...values | any | Values to print. |
Return value
undefinedReturns nothing.
Examples
An informational message:
console.info('Server started on port', 3000);Output:
Server started on port 3000Notes
It works almost like console.log(); some browsers show an i icon next to it. Message levels (log, info, warn, error) help filter the output.
See also
- console.log — Prints values to the console.
- console.warn — Prints a warning — highlighted in yellow in the console.
In the tutorial
- Debugging — How to find bugs in JavaScript: reading the error message, console.log and its variants, checking types, developer tools and debugger.