## Es 6 Trick to Swap values between two variables | Javascript to Swap values between two variables

You can use following trick to swap values between two variables in es6.

let a = 5; let b = 10; [a,b] = [b,a]; // a = 10 b = 15