如何不声明第三个变量,交换两个值

//代码如下

var a=1,b=2;

a=[b,b=a][0];

console.log(a,b)

猜你喜欢

转载自blog.csdn.net/namechenfl/article/details/81098699