Chrome JavaScript开发人员控制台:是否可以调用console.log()而不使用换行符? [英] Chrome JavaScript developer console: Is it possible to call console.log() without a newline?

查看:650
本文介绍了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天全站免登陆