Use Destructuring Assignment to Assign Variables from Nested Objects, Learning the ES6 Syntax

preview_player
Показать описание
In this lesson from freeCodeCamp's ES6 Challenges, we continue looking at the destructuring syntax using ES6. In this lesson, we specifically look at targeting values and keys within nested objects. We learn that it is very similar to extracting values and re-assigning variables of regular objects. The only difference is that within the curly braces, we specify the name of the object within the object, then followed the name by colons that are followed by curly braces. Within here we use the same concepts we have been learning for destructuring. We can extract values from objects and save them in const variables, and reasign the variable names as well.
Рекомендации по теме
join shbcf.ru