在交换a和b的值得时候一直显示b是未定义的
let a = 1 let b = 2 [b, a] = [a, b] console.log(a,b)
浏览器显示:
Uncaught ReferenceError: b is not defined
at 3_destruturing.html:16
其他的解构应用都是正常的,这是怎么回事啊?
let a = 1 let b = 2 [b, a] = [a, b] console.log(a,b)
浏览器显示:
Uncaught ReferenceError: b is not defined
at 3_destruturing.html:16
其他的解构应用都是正常的,这是怎么回事啊?
2020-07-24
举报