In addition to console.log
, JavaScript provides other logging methods like console.info
, console.warn
, and console.error
. These methods log messages with different levels of severity, which can be visually distinguished in the console.
console.info('This is an info message'); // Output: Info: This is an info message
console.warn('This is a warning message'); // Output: Warning: This is a warning message
console.error('This is an error message'); // Output: Error: This is an error message