Use Destructuring Assignment to Assign Variables from Nested Objects : this challenge is throwing error upon completing it

Use Destructuring Assignment to Assign Variables from Nested Objects : this challenge is throwing error upon completing it
0

#1

Tell us what’s happening:

Your code so far


const forecast = {
  today: { min: 72, max: 83 },
  tomorrow: { min: 73.3, max: 84.6 }
};

function getMaxOfTmrw(forecast) {
  "use strict";
  // change code below this line
  const{tomorrow:{max:maxOfTomorrow}}=forecast; // change this line
  // change code above this line
  return maxOfTomorrow;
}

console.log(getMaxOfTmrw(forecast)); // should be 84.6

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects/


#2

Copy-pasting your function will pass the challenge^^ The problem is that you modified the original code ( you renamed the argument the same as the parameter).
Just reset your code through the reset all code button and use the same function^^


#3

thanks fixed it already