<

Nodejs Console Tutorial

The Node.js console module is a simple debugging console similar to JavaScript console.

Different Types of Nodejs Console Methods


  • console.assert()

  • console.clear()

  • console.count()

  • console.countReset()

  • console.debug()

  • console.dir()

  • console.dirxml()

  • console.error()

  • console.group()

  • console.groupCollapsed()

  • console.groupEnd()

  • console.info()

  • console.log()

  • console.table()

  • console.time()

  • console.timeEnd()

  • console.timeLog()

  • console.trace()

  • console.warn()

  • console.log()

  • console.error()

  • console.warn()


  • Node.js Console.Log()

    The console.log() function is used to display simple message on console.

    Example

    console.log('JavaMeant');   
    


    Node.js console.error()

    The console.error() function is used to render error message on console.

    Example

    console.error(new Error('error message.'));  
    
    


    Node.js console.warn()

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

    Example

    const name = 'hello';  
    console.warn(` ${name} world!`);   
    















    © copyright 2017-2022 Completedone pvt ltd.