Transcript from the "Destructuring Solution" Lesson
>> Kyle Simpson: All right, well let's talk about this destructuring exercise, we'll take a look at how to solve it. We start with the defaults object, but our goal is to not have to manage this in a separate object. Our goal is to have those values in line into our destructuring pattern.
[00:00:44] And also a slides object which has a start that defaults to 0 and an end of it defaults to 100.
>> Kyle Simpson: So that is as breaking down which means we end up creating four variables, the topic variable, the format variable, and then start an end. And then all we should need to do is restructure those back together so we will add topic and format back in and then we will add a slides object that includes start and end.
>> Kyle Simpson: Now if you wanted to be able to pass along any properties that you hadn't otherwise already accounted for, you could use the object gather and say ...otherProperties. And then you would simply do an object spread by saying, ...otherProps,
>> Kyle Simpson: It's not needed for this particular example but just to give you an idea of how your destructuring pattern can include anything else that might have been passed along.