ES6: Use Destructuring Assignment to Assign Variailes from Objects

what is the ES5 assignment syntax

Your code so far

      const HIGH_TEMPERATURES = {
  yesterday: 75,
  today: 77,
  tomorrow: 80
};

// Only change code below this line
  
const highToday = HIGH_TEMPERATURES.today;
const highTomorrow = HIGH_TEMPERATURES.tomorrow; 

// Only change code above this line


const HIGH_TEMPERATURES = {
yesterday: 75,
today: 77,
tomorrow: 80
};

// Only change code below this line

const highToday = HIGH_TEMPERATURES.today;
const highTomorrow = HIGH_TEMPERATURES.tomorrow; 

// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36.

Challenge: Use Destructuring Assignment to Assign Variables from Objects

Link to the challenge:

this, where you access each property individually

1 Like

You should remove the ES5 assignment syntax

does anyone know what that means :slightly_smiling_face: :slightly_smiling_face:

ES5 and ES6 are versions of javascript

in this case “ES5 assignment syntax” means the assignment in which you access the object property using dot or bracket notation, like taught here:

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation

1 Like

yeah i know the that stuff bot i dont get how to remove the ES5 assignment syntax

you need to delete the lines

what lines :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face:

to remove the ES5 assignment syntax you need to delete the lines where it is present and replace with the ES6 destructuring assignment

thanks i get it more now