简体   繁体   English

为什么 VS 代码的变量名有问题?

[英]why VS code has problem with variable name?

Why vs code has problem when I write let name = "Hi";为什么当我写时 vs 代码有问题let name = "Hi"; it has problem with the name and i should change it to something like:sname, fname or etc.它的名称有问题,我应该将其更改为:sname、fname 等。

The global variable name is predefined in browsers.全局变量name是在浏览器中预定义的。

Your linter is complaining that you are trying to redeclare it in a global scope.您的 linter 抱怨您正试图在全局 scope 中重新声明它。

VS 代码截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM