Node.js console.log() Function Last Updated : 14 Oct, 2021 Comments Improve Suggest changes Like Article Like Report The console.log() function from console class of Node.js is used to display the messages on the console. It prints to stdout with newline. Syntax: console.log( [data][, ...] ) Parameter: This function contains multiple parameters which are to be printed. Return type: The function returns the passed parameters. Below program demonstrates the working of console.log() function: Program 1: javascript function GFG(name) { console.log("hello " + name); } // when parameters are passed GFG("Geeksforgeeks"); Output: Program 2: javascript function GFG(name) { console.log("hello " + name); } // No parameters are passed GFG(); Output: Comment More infoAdvertise with us Next Article Node.js console.log() Function T Twinkl Bajaj Follow Improve Article Tags : Web Technologies Node.js NodeJS-function Similar Reads Node.js console.error() Function The console.error() function from the console class of Node.js is used to display an error message on the console. It prints to stderr with a newline. Syntax:Â console.error([data][, ...args]) Parameter: This function can contain multiple parameters. The first parameter is used for the primary messa 1 min read Node.js console.count() Method The console.count() method is an inbuilt application programming interface of the console module which is used to count label passed to it as a parameter, by maintaining an internal counter for that specific label. Syntax: console.count(label) Parameters: This method has one parameter as mentioned a 2 min read Node.js assert() Function The assert() function in Node.js is used for testing and verifying assumptions in your code. It is part of the built-in assert module, which provides a set of assertion functions to perform various checks and validations.Node assert FunctionIn assert() function, if the value is not truth, then a Ass 3 min read Node.js console.info() Method The console.info() method is an inbuilt application programming interface of the console module which is used to print messages to stdout in a newline. It is similar to the console.log() method. Syntax: console.info(data, args); Parameters: This method has two parameters as mentioned above and descr 2 min read Node.js Console The console module is essential for debugging and logging in Node.js applications. It enables developers to print messages to the terminal, making it easier to monitor application behavior, track issues, and display runtime information.Console in Node.js The console module in Node.js is a built-in u 4 min read Like