How can I use Destructuring Assignment

Tell us what’s happening:

I can’t figure it out. It seems I didn’t get something right. please help.

Your code so far


const HIGH_TEMPERATURES = {
 yesterday: 75,
 today: 77,
 tomorrow: 80
}; const HIGH_TEMPERATURE = {today: 77, tomorrow: 80};
// Only change code below this line
const {today: highToday, tomorrow: highTomorrow} = HIGH_TEMPERATURE; 
// Only change code above this line
console.log(highToday);
console.log(highTomorrow);

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.97 Safari/537.36.

Challenge: Use Destructuring Assignment to Assign Variables from Objects

Link to the challenge:

You don’t need to create custom HIGH_TEMPERATURE variable for this, you need to use destructuring assignment on HIGH_TEMPERATURES instead

1 Like

Yes that’s right.
Thank you for your help.