1
00:00:02,300 --> 00:00:06,200
Now before we dive into the problems this can bring,

2
00:00:06,200 --> 00:00:11,490
let's first dive into an alternative methods syntax which you can also use.

3
00:00:11,570 --> 00:00:18,620
This is one way of defining a method, a shorter way is to remove the function keyword, remove the colon

4
00:00:18,950 --> 00:00:26,240
and add the parentheses right after this property name. So you no longer have a traditional key-value

5
00:00:26,240 --> 00:00:27,660
pair here with a colon

6
00:00:27,770 --> 00:00:29,870
but instead you have this syntax.

7
00:00:29,870 --> 00:00:34,910
Side note, if you would use an arrow function here, well then you need to remove that arrow as well.

8
00:00:34,940 --> 00:00:41,510
So this is now just a different shorthand for adding a method to an object. Behind the scenes, it's actually

9
00:00:41,510 --> 00:00:46,370
not exactly the same as this here but for the moment, we can ignore this, I will come back to this in

10
00:00:46,370 --> 00:00:51,250
a later module because it's a bit more advanced and it simply doesn't matter for the moment.

11
00:00:51,290 --> 00:00:54,620
So this is now a method and it behaves just as before,

12
00:00:54,620 --> 00:01:01,010
if we save that and reload and quickly enter Javascript level 5 or whatever you want, you see that

13
00:01:01,010 --> 00:01:01,730
works.

14
00:01:01,730 --> 00:01:04,820
So that's a shorter method syntax which I will now use.
