Assign Variables from Arrays 2

This is a simple task, not even a challenge :sweat_smile: I do not understand why this is not working


let a = 8, b = 6;
// Only change code below this line
[a, b] = [b, a];

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36

Challenge: Use Destructuring Assignment to Assign Variables from Arrays

Link to the challenge:

That’s exactly what I did and my answer was correct. I’m not sure how else to help, but at least you know you’re not crazy! Probably an issue with your browser.

Hi @ueshya and @sdnorris . Have you guys tried console.log with both variables and testing? Also, @ueshya , welcome to the FCC forum! :slight_smile:

Update: I just tried with the console.log and without it and both worked.
Please try to refresh the browser and do the test once more by clicking on Run the Tests and tell us the result.

Well as u said, I was not crazy :grin: I did in fact refresh the browser twice and it finally worked the third time. Sry for that waist of time and thanks !

1 Like

Not at all a waste, @ueshya ! It’s actually strange that it only worked on the third attempt on refreshing. Thanks for returning the results in the end and welcome once more. :slight_smile:

1 Like

Btw, if this is useful, I used Brave as brower. ( not using it to code, though ).
And also please excuse my bad english !
Nice community u got there. Love this plateform.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.