1
00:00:02,482 --> 00:00:05,681
we had this isAdult method. Let's add that

2
00:00:05,681 --> 00:00:08,744
to our new class. The syntax for this is

3
00:00:08,744 --> 00:00:10,523
nice and simple too, you just start with

4
00:00:10,523 --> 00:00:12,867
the function name like this, and then the

5
00:00:12,867 --> 00:00:15,599
implementation just goes inside here. And

6
00:00:15,599 --> 00:00:18,401
that's it, that's noticeably more simple

7
00:00:18,401 --> 00:00:20,558
than the constructor function version. So

8
00:00:20,558 --> 00:00:23,664
now we can call that function down here,

9
00:00:23,664 --> 00:00:27,050
so we can display jim.isAdult, and you can

10
00:00:27,050 --> 00:00:31,829
see that returns true because Jim is 29.

11
00:00:31,829 --> 00:00:32,997
So adding functions to a class is super

12
00:00:32,997 --> 00:00:35,294
easy, you just start with a function name,

13
00:00:35,294 --> 00:00:38,303
followed by parentheses and the function

14
00:00:38,303 --> 00:00:39,983
body. So we've seen how to add methods or

15
00:00:39,983 --> 00:00:43,034
functions and properties to classes, but

16
00:00:43,034 --> 00:00:44,969
let's take a look now at how we might

17
00:00:44,969 --> 00:00:49,000
manipulate properties on a class using property descriptors.

