Destructuring with reassignment was used

What’s wrong with my code



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`Preformatted text

You need to use the parameter of the function, not the global object.

You are not using the parameter of the function

2 Likes

Thank you :sweat_smile: