I can’t seem to get it right. I console logged my code and it was the right value but it kept saying “You should use array destructuring to swap a and b.” what did it mean by that and why is it wrong even if a swapped the values correctly?
Your code so far
let [b, a] = [8, 6] console.log(a, b) // Only change code below this line
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.44.
Challenge: Use Destructuring Assignment to Assign Variables from Arrays
Link to the challenge: