Chrome JavaScript developer console: Is it possible to call console.log() without a newline?

前端 未结 12 859
生来不讨喜
生来不讨喜 2020-11-29 05:07

I\'d like to use console.log() to log messages without appending a new line after each call to console.log(). Is this possible?

12条回答
  •  渐次进展
    2020-11-29 05:36

    You can put as many things in arguments as you'd like:

    console.log('hi','these','words','will','be','separated','by','spaces',window,document)

    You'll get all that output on one line with the object references inline and you can then drop down their inspectors from there.

提交回复
热议问题