Help cant solve FCC problem in ES6 portion of javascript

why was this wrong

const AVG_TEMPERATURES = {
  today: 77.5,
  tomorrow: 79
};

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

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

and why was this correct?

const AVG_TEMPERATURES = {
  today: 77.5,
  tomorrow: 79
};

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

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

Please give a simple explanation.
also if you can suggest some useful resources regarding my misconception (above) so that I can learn it properly please do so.

this topic is from ES6: Use Destructuring Assignment to Assign Variables from Objects

The text in the challenge wasn’t correctly written. There is a bug open on this issue, and it should be fixed in the next release of FCC.

i had read some posts on the same issue but couldn’t quite understand them. they were something about parameter scope.

It’s nothing to do with scope, really, it’s just that the text of the challenge says to destructure AVG_TEMPERATURES, but the tests are actually looking for avgTemperatures. It’s just that the documentation is wrong, that’s all.

Thank you very much , sir.