I searched around for what other people posted about this challenge, but their challenges look different. Did FreeCodeCamp update it recently? Anyhow, here’s what I came up with.
const AVG_TEMPERATURES = {
today: 77.5,
tomorrow: 79
};
function getTempOfTmrw(avgTemperatures) {
"use strict";
// change code below this line
const { today : whatever, tomorrow : tempOfTomorrow } = avgTemperatures; // change this line
// change code above this line
return tempOfTomorrow;
}
console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79
My function returns 79 as it should, but I’m failing the ‘destructuring with reassignment was used’ test. I’m pretty positive that’s what I used, though. Is there a bug in the challenge, or do I have some kind of blind spot?