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
You need to look at the function definition and how the function gets called.
The function definition has a parameter avgTemperatures and when the function is called it gets passed the object getTempOfTmrw(AVG_TEMPERATURES). So you need to use the parameter inside the function, not the “global/top level” object outside the function.