Using Destructuring Assignment to Assign Variables from Objects

Tell us what’s happening:
please can someone out there help me with this code i’ve been trying so hard but it seems like i got stuck

Your code so far

  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; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36.

You got it! In your function, just change AVG_TEMPERATURES to avgTemperatures so you’re referencing the object scoped to your function instead of the global variable.

thanks I’ve done it and it has worked ill be moving forward now