Chrome JavaScript 开发者控制台:是否可以在没有换行符的情况下调用 console.log()? [英] Chrome JavaScript developer console: Is it possible to call console.log() without a newline?

查看:21
本文介绍了Chrome JavaScript 开发者控制台:是否可以在没有换行符的情况下调用 console.log()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用console.log() 来记录消息 在每次调用console.log() 后不附加新行.这可能吗?

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

推荐答案

不,这不可能.如果您希望将其全部放在一行中,则必须保留一个字符串并进行连接,或者将您的输出放在其他地方(例如,另一个窗口).

No, it's not possible. You'll have to keep a string and concatenate if you want it all in one line, or put your output elsewhere (say, another window).

这篇关于Chrome JavaScript 开发者控制台:是否可以在没有换行符的情况下调用 console.log()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆