Need helpUse Destructuring Assignment to Assign Variables from Objects

Tell us what’s happening:

Your code so far


const AVG_TEMPERATURES = {
  today: 77.5,
  tomorrow: 79
};

function getTempOfTmrw(avgTemperatures) {
  "use strict";
  // change code below this line
  const tempOfTomorrow = AVG_TEMPERATURES.tomorrow;  // 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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects

Make sure to use the argument avgTemperatures instead of the constant AVG_TEMPERATURES.

Besides that, you may have to fix your logic.

@TeyannaJ As @ghukahr said, use the function parameter avgTemperatures and read through the instructions again, and see if you need to change something on the left side of the assignment…

Note: This challenge was a bit confusing and took some time for few of my friends as well… So, take your time.