我正在使用 vscode 来学习 javascript,但是由于某种原因,当我在 console.log = ('hello world'); 文件中运行代码 .js 或在 html 文件的正文中使用 script 标记时,没有任何显示在 chrome 开发者控制台部分。但是,如果我在 .js 或 html 中使用警报,则正常显示就在那里。
console.log = ('hello world');
.js
script
html
谁能帮我解决这个问题?谢谢!
因为你用错了
console.log("hello")
不是
console.log = "hello"