SyntaxFix
Write A Post
Hire A Developer
Questions
In ES6 now there is destructuring assignment and you can do:
let a = 1; let b = 2; [b, a] = [a, b] // a = 2, b = 1