<分区>
当我定义变量名时
let name = 'synergy';
并尝试使用
将其记录到控制台console.log(name);
它执行得很好,但 vscode 划掉了名字:
我不确定要做什么或为什么 vscode 这样做。
<分区>
当我定义变量名时
let name = 'synergy';
并尝试使用
将其记录到控制台console.log(name);
它执行得很好,但 vscode 划掉了名字:
我不确定要做什么或为什么 vscode 这样做。
最佳答案
在浏览器中,全局名称变量具有特殊含义。 可能是您的 linter 只是检测并混淆了变量的名称。尝试将名称更改为其他名称,看看它是否仍然被划掉。
希望我有所帮助!
关于javascript - 为什么我的变量在 VS Code 中被划掉了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66287986/
相关文章:
visual-studio-code - Visual Studio Code - 可以对 "OPEN EDITORS"面板进行排序吗?
visual-studio-code - 有没有办法找出 Visual Studio Code 正在监视的文件列表?
javascript - Node.js:Map 函数不适用于来自 PostgreSQL 的查询
javascript - 代码在 jsfiddle 中有效,但在 chrome 中无效。 - 未捕获的类型错误 : Cannot read property 'style' of undefined
android - 无法启动模拟器 : Error: Emulator didn't connect within 60 seconds
visual-studio-code - vscode - 有没有办法创建 `vscode.TextDocument` 的实例?