Destructuring Example 15 Destructuring arrays - swapping variables by shravan June 13, 2016 Babel + JSX let x = 10, y = 20; [x, y] = [y, x]; console.log(x, y); //20 10