function getTempOfTmrw(avgTemperatures) {
“use strict”;
// change code below this line
const { tomorrow : tempOfTomorrow } = avgTemperatures; // change this line
// change code above this line
return tempOfTomorrow;
}
console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
Your code is valid. However the test that you are trying to pass is looking for a particular destructuring pattern. The requirements are asking specifically to assign value of tomorrow into tempOfTomorrow. However your pattern desconstructs two values and thus does not meet the required test pattern to pass.
At least this is what I think is going on. It can be frustrating to know something works but you are failing to pass the tests. What I like to do is if my code compiles and my values seem correct. To look at what the requirements are asking and make sure I am fulfilling those.