i have a feeling that I don’t understand the full picture of this tutorial, i have no idea what to do.
it’s giving me this :
“destructuring with reassignment was used”
I think you solved the problem correctly but by changing the name of the argument to ‘x’ you messed up their test. The instructions were to not change code above a certain line which you have done.
Is it just being finicky because you changed the name of the argument - avgTemperatures is the one used in the code, and you’ve changed it to x. It looks correct otherwise, I don’t think you’re misunderstanding anything
Weird thing, but this challenge doesn’t work with the right code.
const AVG_TEMPERATURES = {
today: 77.5,
tomorrow: 79
};
function getTempOfTmrw(avgTemperatures) {
"use strict";
// change code below this line
const {tomorrow : tempOfTomorrow, today : a} = AVG_TEMPERATURES; // change this line
// change code above this line
return tempOfTomorrow;
}
console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79
This code doesn’t work. With “today : a” or without - an error occurs. “destructuring with reassignment was used”
I think there is something wrong with this challenge.