console.info()
Description
The console.info()
method outputs an informational message in green color to the console, each message is marked with the info icon. It is similar to console.log()
, but intended for informational purposes. It can accept multiple arguments and display them in one line.
Syntax
JSconsole.info(message1: any, message2: any, messageN: any) -> void
Parameters
Parameter |
Type |
Description |
message1 |
any |
The text of the message. |
message2 |
any |
The text of the message. |
messageN |
any |
The text of the message. |
Return value
Type |
Description |
void |
An empty value. |
Example
JS |
---|
| // One argument
console.info('info text')
// Multiple arguments
console.info('text1', 'text2')
console.info('text1', 'text2', .. , 'text10')
// Different types of arguments
console.info('text1', 123, true, { key: 'value''})
|
Last update: 14 August 2025, 18:47