Tell us what’s happening:
I actually solved this, but I had to remove ‘const’ from my solution. I thought for this to be considered destructuring I had to use ‘const’ to reassign?
Your code so far
let a = 8, b = 6;
// Only change code below this line
[a, b] = [b, a]
console.log(a, b)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62
Challenge: Use Destructuring Assignment to Assign Variables from Arrays
Link to the challenge: