Dont know where I am doing wrong

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 {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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 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/

Part of the mantra of lessons on FCC is “Read * Research * Ask”. There’s a reason for that. Often, the answers to questions can be found on the Mozilla Developer’s Network (MDN) or some other JS related site (personally, I’m a HUGE fan of http://devdocs.io/ for all my web dev reference needs. :wink: ).

For answers specific to “Why can’t I Pass this Test?”, however, you might need to do a little more research. The particular issue you’re having is a very very common one. It is answered on these forums at least weekly, if not more often. What does that mean for you? Use the magnifying glass in the page header, and you can search past posts. One of those is very helpful: Can't pass " Use Destructuring Assignment to Assign Variables from Objects ".

1 Like

I fixed it long back and thanks for the suggestion. :grinning: