Skip to content

Instantly share code, notes, and snippets.

@hungthai1401
Created October 26, 2018 06:42
Show Gist options
  • Save hungthai1401/5ee5acf125725a17389b4ac3e13a3aad to your computer and use it in GitHub Desktop.
Save hungthai1401/5ee5acf125725a17389b4ac3e13a3aad to your computer and use it in GitHub Desktop.
Swap value of variables using destructuring assignment
let a = 10, b = 12;
[a, b] = [b, a];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment