EasyClick技术交流站's Archiver
首页
›
安卓问题交流
› 执行错误:TypeError: redeclaration of variable a
沙瑞金
发表于 2022-10-23 10:19:26
执行错误:TypeError: redeclaration of variable a
执行错误:执行错误:TypeError: redeclaration of variable a
同一个代码块中,用let定义了两次以上同一个变量名就会报此错误
let a
let a
//执行错误:执行错误:TypeError: redeclaration of variable a
解决方法搜索报错中的变量名,比如例子中的a,删除第二个let定义符
页:
[1]
查看完整版本:
执行错误:TypeError: redeclaration of variable a