const AVG_TEMPERATURES = {
today: 77.5,
tomorrow: 79
};
function getTempOfTmrw(avgTemperatures) {
"use strict";
// change code below this line
const {tomorrow : tempOfTomorrow} = avgTemperatures
// change code above this line
return tempOfTomorrow;
}
console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79
Hello, I have my code block encased above and I do meet all criteria, but I am wondering why I actually need the =avgTempertures variable to be referenced in this problem. I understand that I’m retrieving the value 79 from the const AVG_TEMPERATURES and that the value is given from the return temperatureOfTomorrow line.
So my question is why do I need to equal the value to avgTemperatures if I have already taken the value and returned it where I need.