第一种第二种"> 第一种 var a = 1, b = 2; a = a + b; // a = 3, b = 2 b = a - b; // a = 3, b = 1 a = a - b; // a = 2, b = 1 console.log(a,b); 第二种//ES6解构赋值 let a = 1, b = 2; [a, b] = [b, a]; console.log(a, b);