faeze
0
Q:

Swap values with array destructuring

let a = 1, b = 2
[a, b] = [b, a]
console.log(a) // -> 2
console.log(b) // -> 1
0

New to Communities?

Join the community