problem: As shown below, now there are two variables, a and b. How can a get the value of b and b get the value of a in the easiest way?
> let a = 1
> let b = 2
The fastest and easiest way is to use: ES6 deconstruction allocation in JavaScript
let a = 1
let b = 2
[b, a] = [a, b]
console.log(a,b) // 2 1
In this way, this problem is solved.