Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects

Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects
0

Tell us what’s happening:
Hello guys , this is my code , and i don’t know where’s the mistake , thank u for the help in advance :smiley:

Your code so far


const LOCAL_FORECAST = {
yesterday: { low: 61, high: 75 },
today: { low: 64, high: 77 },
tomorrow: { low: 68, high: 80 }
};

// change code below this line

const { tomorrow : { max : maxOfTomorrow }} =forecast;
// change code above this line

console.log(lowToday); // should be 64
console.log(highToday); // should be 77

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36.

Challenge: Use Destructuring Assignment to Assign Variables from Nested Objects

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

you need these ones not maxOfTomorrow
see challenge description that says:

Replace the two assignments with an equivalent destructuring assignment. It should still assign the variables lowToday and highToday the values of today.low and today.high from the LOCAL_FORECAST object.

oh now i can see , thank u so much for the feedback <3

One other thing to note: by this code, the forecast object should contain:

forecast = {
  tomorrow: {
    max: /* someValue */,
    // ...more potential properties...
  }
}

Is that accurate? Are you looking for a property named max?