Most Popular Tutorials
Most Popular Tutorials :-

Simply Easy Learning at Your Fingertips. Click Tutorials Menu to view More Tutorial List





What is Node.js console?

The Node.js console module provides a simple debugging console similar to JavaScript console mechanism provided by web browsers.
There are three console methods that are used to write any node.js stream:

  • console.log()
  • console.error()
  • console.warn()
  • console.log()

    File Name : test.js

    The console.log() function is used to display information on console.
    console.log('Hello ittutorial.in');
    console.log('Hello %s', 'itechxpert.in');

    Open Node.js command prompt and run the following code:

    node test.js

    console.error()

    console.error(new Error('OOPs! This is a wrong method.'));

    File Name : test1.js

    node test1.js

    console.warn()

    The console.warn() function is used to display warning message on console.

    File Name : exp.js

    const name = 'Sana';
    console.warn('Don't click on ${name}!');





    Previous Next


    Trending Tutorials




    Review & Rating

    0.0 / 5

    0 Review

    5
    (0)

    4
    (0)

    3
    (0)

    2
    (0)

    1
    (0)

    Write Review Here