Use Destructuring Assignment to Assign Variables from Objects (es6 certification)

I have got this right, but not sure why I’m not getting to the next stage. Any suggestion will be greatly appreciated. Thanks!

  today: 77.5,
  tomorrow: 79

function getTempOfTmrw(avgTemperatures) {
  "use strict";
  // change code below this line
  const { tomorrow : tempOfTomorrow } = AVG_TEMPERATURES;
  // change code above this line
  return tempOfTomorrow;

console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79

This is a really annoying challenge, actually!

Firstly, you’re right. You have destructured the object the correct way. So well done!

However, this challenge wants you to destructure the object referred to in the params, not the constant declared out of the scope of the function.

Ouch! Silly mistake. My Bad :slight_smile:

Thanks so much!