![ee404583d76b576886e7cc39f974c879.png](https://img-blog.csdnimg.cn/img_convert/ee404583d76b576886e7cc39f974c879.png)
在JavaScript开发调试中,console.log()是我们最常用的方法,但是还有其它几个常用的方法,值得我们试一试,也许会起到意想不到的效果。
预计本篇文章阅读时间预计2分钟
基础用法——console.log()
![dff21c3dc35e2eba4ea453f59f58084e.png](https://img-blog.csdnimg.cn/img_convert/dff21c3dc35e2eba4ea453f59f58084e.png)
打印一段文本
console.log('Is this working?');
打印对象
const foo = { id: 1, verified: true, color: 'green' };const bar = { id: 2, verified: false, color: 'red' };
接着我们看控制台的输出展现: