I know what the answer is now but, can anyone tell me why this does not work with:
const [b, a] = [a, b]
The example freeCodeCamp gives uses const and then it doesn’t work in the challenge. Very confusing.
Your code so far
let a = 8, b = 6;
(() => {
"use strict";
// change code below this line
[b, a] = [a, b];
// change code above this line
})();
console.log(a); // should be 6
console.log(b); // should be 8