Zak doing the Destructuring Assignment

Hey everyone,

I am having trouble.

My code gives me the correct answer, though the platform is telling me that ‘the destructuring with reassignment was used’…what does that mean and why is it a problem?

There is no explanation available as to what wrong turn I took. This could be a helpful addition going forward.

As far I can tell I have implemented the method properly…any ideas?

  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:

Heya, it’s just the test not detecting your solution correctly

You don’t need to destructure today in there, if you change what you have to: { tomorrow: tempOfTomorrow } the test should pass :slight_smile:

1 Like

Those moments are frustrating- thank you for helping get back on the green!

1 Like