Categories
JavaScript Answers

How to create line breaks in console.log() in Node.js?

Spread the love

To create line breaks in console.log() in Node.js, we log '\n'.

For instance, we write

console.log({ a: 1 }, "\n", { b: 3 }, "\n", { c: 3 });

to log line breaks with '\n'.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.