Tell us what’s happening:
Hello People,
I’ve been trying to complete this task for a while its been a bit challenging. The task is to obtain the average temp for tomorrow form the object AVG_TEMPERATURES using destructing. Based on the examples given and other videos I’ve watched, I felt what I have done so far was sufficient. I’ve been able to return the correct value but still cant complete the challenge.
Any help would be much appreciated.
Cheers
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} = AVG_TEMPERATURES; // change this line
const {tomorrow: tempOfTomorrow} = AVG_TEMPERATURES;
// 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/71.0.3578.98 Safari/537.36
.