let a = 1 let b = 2; [a, b] = [b, a] console.log(a) console.log(b)
注意:这个分号至关重要!!!!!如果不写 b 会报 “is not defined” 的错误