1
00:00:00,120 --> 00:00:07,230
In this lesson we're going to explore JavaScript objects to best illustrate how objects work.

2
00:00:07,230 --> 00:00:16,550
Let's think of a real life object a car for example a car has various properties like name model weight

3
00:00:16,940 --> 00:00:27,140
and color we can include the values for each of these properties inside a single javascript object in

4
00:00:27,140 --> 00:00:28,820
this example.

5
00:00:28,980 --> 00:00:37,820
We've defined a variable named car the car variable is an object and contains several properties including

6
00:00:37,820 --> 00:00:47,810
type model and color if we wanted to output the value of a single property inside this object.

7
00:00:47,810 --> 00:01:01,070
We can use our get element by I.D. output method we can type car dot type to output the car type.

8
00:01:01,200 --> 00:01:06,300
Let's go ahead and test this file in our web browser and see what the output results in

9
00:01:09,170 --> 00:01:09,760
here.

10
00:01:09,790 --> 00:01:11,920
We can see that the output is accurate.

11
00:01:13,500 --> 00:01:16,110
Which correctly reflects the type of the car.

12
00:01:17,480 --> 00:01:25,350
Now if we wanted to output the model we simply need to update from car type to car model

13
00:01:31,550 --> 00:01:39,580
we can save or file and refresh the page and now we have the model output it in our web browser.
