Node.js v14.17.4 documentation


Table of contents

Console#

Stability: 2 - Stable

Source Code: lib/console.js

The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers.

The module exports two specific components:

  • A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream.
  • A global console instance configured to write to