console.log in node js code example
Example 1: print to console without newline nodejs
process.stdout.write("hello: ");
Example 2: node js console.table
function Person(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
var me = new Person("John", "Smith");
console.table(me);
Example 3: node js console log
console.log("hello world");
Example 4: print in node js
console.log('hello world');
console.log('hello %s', 'world');
console.error(new Error('Whoops, something bad happened'));
const name = 'Will Robinson';
console.warn(`Danger ${name}! Danger!`);