Is there a way to get new lines in console.log when printing multiple objects?
Suppose we have console.log(a,b,c)
where a
, b
,
An alternative is creating your own logger along with the original logger from JS.
var originalLogger = console.log;
console.log = function() {
for (var o of arguments) originalLogger(o);
}
console.log({ a: 1 }, { b: 3 }, { c: 3 })
If you want to avoid any clash with the original logger from JS
console.ownlog = function() {
for (var o of arguments) console.log(o);
}
console.ownlog({ a: 1 }, { b: 3 }, { c: 3 })