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
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 YaBrowser/19.3.2.177 Yowser/2.5 Safari/537.36.
@Alex121618, this is quite tricky as I had to look closely to discover that you are not using the argument passed to the function avgTemperatures instead you tried to access the global variable AVG_TEMPERATURES directly which is not good hence won’t work as expected. However, I feel the error message destructuring with reassignment was used was not descriptive enough as I couldn’t figure out what that actually means until I read @gebulmer’s post above as a fix, change AVG_TEMPERATURES in the function body to avgTemperatures. This should solve it.