When tracing out variables in the console, How to create a new line?

后端 未结 7 1281
孤街浪徒
孤街浪徒 2021-01-30 03:39

So I\'m trying to do something simple, I want to break up my traces in the console into several lines, using 1 console.log statement:

console.log(\'roleName = \'         


        
相关标签:
7条回答
  • 2021-01-30 04:29

    You need to add the new line character \n:

    console.log('line one \nline two')
    

    would display:

    line one

    line two

    0 讨论(0)
提交回复
热议问题