浏览器不输出

运行代码, 发现没有得到数字1, 只得到了 undefined

1
console.log(1);

  1. Open DevTools by pressing F12 or ctrl + shift + i
  2. press F1 or click on … on the top right corner beside cross to open settings
  3. scroll at the bottom or to the right of screen and press [restore defaults and reload] button
  4. Restart chrome
    NOTE: relaunch chrome is very much necessary

    找到设置, 点 restore defaults and reload
    注意此方法会清空所有的 Script Snippet

再次尝试, 成功得到了1

参考:


浏览器不输出
https://xiamu.icu/JS/浏览器不输出/
作者
肉豆蔻吖
发布于
2025年4月21日
许可协议