how to create line breaks in console.log() in node
Add \n
(newline) between them:
console.log({ a: 1 }, '\n', { b: 3 }, '\n', { c: 3 })
I have no idea why this works in node but the following seems to do the trick:
console.log('',a,'\n',b,'\n',c)
compliments of theBlueFish
Without adding white space at start of new line:-
console.log("one\ntwo");
output:-
one
two
This will add white space at start of new line:-
console.log("one","\n","two");
output:-
one
two