Help : Use Destructuring Assignment to Assign Variables from Objects

Tell us what’s happening:

Your code so far

  today: 77.5,
  tomorrow: 79

function getTempOfTmrw(avgTemperatures) {
  "use strict";
  // change code below this line
  const {tomorrow : a } = AVG_TEMPERATURES;
  const tempOfTomorrow = a ;
  // change code above this line
  return tempOfTomorrow;

console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:

so, you know how to destructure, and you did it correctly, but the challenge is expecting you to destructure giving the variable the new name of tempOfTomorrow, and not of a. You shouldn’t have the second line in which you assign a to the variable tempOfTomorrow.

The other thing is that you need to use the function parameter, not a global object