1
00:00:02,300 --> 00:00:08,150
So this is it for this module, you learned a lot about objects and there most importantly, about object

2
00:00:08,150 --> 00:00:10,400
oriented programming and classes.

3
00:00:10,400 --> 00:00:16,110
Classes are blueprints, blueprints you use to create objects based on them

4
00:00:16,160 --> 00:00:22,790
with the help of the new keyword. The new keyword and then by executing the class like a function, like

5
00:00:22,790 --> 00:00:25,160
we're doing it here for example.

6
00:00:25,160 --> 00:00:30,530
This creates a new object which you then can use or you can ignore like here if you don't need to do anything

7
00:00:30,530 --> 00:00:34,260
with the object but you can and that's the important thing about classes,

8
00:00:34,310 --> 00:00:38,350
you can add data and logic inside of the class.

9
00:00:38,420 --> 00:00:41,170
You can use public and private properties,

10
00:00:41,240 --> 00:00:47,110
you can add a constructor to define logic that executes right away when the object is created.

11
00:00:47,210 --> 00:00:54,380
You can group any logic you need into that class and you can also use inheritance to share common functionalities,

12
00:00:54,380 --> 00:00:57,460
like here createRootElement.

13
00:00:57,560 --> 00:01:05,030
This allows you to split your code into reusable units where your objects and your classes are the units

14
00:01:05,030 --> 00:01:10,250
that hold your logic and your data and you then build your app from these units.

15
00:01:10,250 --> 00:01:14,990
Certainly a different way of thinking about your program, also not the only correct way,

16
00:01:14,990 --> 00:01:17,590
you can also work with functions and so on

17
00:01:17,750 --> 00:01:24,100
but an approach which often helps you structure your code in a cleaner, easier to understand way.

18
00:01:24,200 --> 00:01:30,260
Therefore classes are super important as always and as you saw already in this course, we'll of course

19
00:01:30,260 --> 00:01:32,330
keep on using the features you learned about

20
00:01:32,330 --> 00:01:37,050
and of course we'll keep on using class as you will see them again in other parts of the course,

21
00:01:37,070 --> 00:01:43,220
it's a core concept of modern programming and something you'll see in many applications you build with

22
00:01:43,220 --> 00:01:44,810
the help of Javascript,

23
00:01:44,810 --> 00:01:48,650
it's not a must use everywhere but really useful to understand.
