es6交换两个值

let a='a',b='b'
let [a,b]=[b,a];//借助数组解构
let {a:b,b:a}={a,b}//利用别名进行对象解构
原文地址:https://www.cnblogs.com/samsara-yx/p/13071474.html