Hi. I read the explanation for deconstructing an array and it make sense. But in this operation, the starting statement doesn’t seem to be an array (according to what I’ve learned so far). I’m supposed to reassign the values somehow, but the article didn’t go over an example of that operation either.
I tried making an array like this const [a, b]
, but it says a
and b
have already been declared. hmm… I tried some other things but none of them would have reassigned the values. I’m kind of stumped. Can someone give me an idea of how to get started?
Tell us what’s happening:
Describe your issue in detail here.
Your code so far (this is just the sample problem, I already deleted my attempt.)
let a = 8, b = 6;
// Only change code below this line
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Challenge: Use Destructuring Assignment to Assign Variables from Arrays
Link to the challenge: