Tell us what’s happening:
I’m doing this problem on destructuring array and i can’t run the code if i declare [b, a] with const. I know a , b are declare before but we didn’t define array so why cant we define it with const. PLEASE HELP!!
Your code so far
let a = 8, b = 6;
// Only change code below this line
[b, a] = [a, b];
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0.
Challenge: Use Destructuring Assignment to Assign Variables from Arrays