ZSACH

关注

执行错误:TypeError: redeclaration of variable a

ZSACH

关注

阅读 59

2022-10-18


执行错误:执行错误:TypeError: redeclaration of variable a

同一个代码块中,用let定义了两次以上同一个变量名就会报此错误

let a
let a
//执行错误:执行错误:TypeError: redeclaration of variable a

解决方法

搜索报错中的变量名,比如例子中的a,删除第二个let定义符

相关推荐

一天清晨

js报TypeError $(...) is null错误

一天清晨 105 0 0

Soy丶sauce

mysql执行TypeError: not enough arguments for format string

Soy丶sauce 72 0 0

半夜放水

Python错误TypeError: write() argument must be str, not bytes

半夜放水 86 0 0

吴wuwu

The JAVA_HOME environment variable is not defined correctly的错误

吴wuwu 68 0 0

微笑沉默

Python创建数组的TypeError: data type not understood错误

微笑沉默 46 0 0

归零者245号

python函数常见错误local variable ‘count‘ referenced before assignment

归零者245号 74 0 0

Fifi的天马行空

variable === undefined 与 typeof variable ===

Fifi的天马行空 45 0 0

千妈小语

python错误提示:TypeError: ‘builtin_function_or_method‘ object is not subscriptable

千妈小语 149 0 0

丹柯yx

[Maven] The JAVA_HOME environment variable is not definded...... 配置错误日志

丹柯yx 27 0 0

驚鴻飛雪

/network.sh 执行错误

驚鴻飛雪 86 0 0

精彩评论(0)

0 0 举报