I am using freecodecamp and my assignment is to "Use destructuring assignment to obtain max of forecast.tomorrow and assign it to maxOfTomorrow." While my code does produce the correct number, the testing program claims I did not use nesting deconstructing. Please take a look at my code and tell me what I need to change. Thank you.
const LOCAL_FORECAST = {
today: { min: 72, max: 83 },
tomorrow: { min: 73.3, max: 84.6 }
};
function getMaxOfTmrw(forecast) {
"use strict";
const { tomorrow: { max: maxOfTomorrow } } = LOCAL_FORECAST;
return maxOfTomorrow;
}
console.log(getMaxOfTmrw(LOCAL_FORECAST)); // should be 84.6
LOCAL_FORECASTinstead of the parameterforecast