how to create line breaks in console.log() in node

后端 未结 7 1574
一生所求
一生所求 2021-01-01 13:11

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,

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 13:45

    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

提交回复
热议问题