I can’t figure out why it says the second test didn’t pass… according to the console it should have passed, and i did see the 79 before i hit run the tests.
You are not using the argument variable avgTemperatures.
i didn’t though, i used AVE_TEMPERATURES
Yes. Exactly. You are given a function with an argument variable. You are failing to use that argument variable.
ok now your statement makes more sense now that you’ve edited it 

k i tried the other way using aveTemperatures and it still says its wrong
you need to use destructuring, you just assigned the object property using dot notation
is that not how they did it in the example?
if this is the challenge about destructuring, then no, dot notation is not used. if it is present in the challenge description it is about showing to what destructuring correspond
like in this article, dot notation is used as a comparison about what destructuring does:
https://dev.to/sarah_chima/object-destructuring-in-es6-3fm
so can you show me an example of deconstructing then? everything i try is wrong
Tell us what’s happening:
get 79 in the console but it tells me in the console i did what the second part of the challenge wanted me to do but it does not pass
Your code so far
const AVG_TEMPERATURES = {
today: 77.5,
tomorrow: 79
};
function getTempOfTmrw(avgTemperatures) {
"use strict";
// change code below this line
const {today, tomorrow:tempOfTomorrow} = avgTemperatures; // 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/76.0.3809.100 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/
There is no reason to destructure today as it is not needed to solve the problem.

