Swap two variables

let a = 10;
let b = 20;

[a, b] = [b, a];
  • javascript