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
You can override console.log
to add custom behavior, such as logging to a file, sending logs to a server, or adding timestamps.