Can you explain what am I doing wrong and what’s the correct way of doing this.
Your code so far
const HIGH_TEMPERATURES = {
yesterday: 75,
today: 77,
tomorrow: 80
};
// change code below this line
const { yesterday, today, tomorrow } = HIGH_TEMPERATURES;
// change code above this line
console.log(yesterday) // should be not defined
console.log(today); // should be 77
console.log(tomorrow); // should be 80
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.
Challenge: Use Destructuring Assignment to Extract Values from Objects
in the line const { yesterday, today, tomorrow } = HIGH_TEMPERATURES; you are creating yesterday, today and tomorrow and taking their values from HIGH_TEMPERATURES using destructuring.