1
00:00:02,450 --> 00:00:03,500
Now that we learned

2
00:00:03,500 --> 00:00:06,910
about comparison operators and logical operators,

3
00:00:06,910 --> 00:00:10,630
here we could say that we wanna print this

4
00:00:10,630 --> 00:00:12,760
if the name is Max.

5
00:00:12,760 --> 00:00:15,230
So here instead of hard coding true,

6
00:00:15,230 --> 00:00:17,500
we could say we wanna go in there

7
00:00:17,500 --> 00:00:19,760
and execute this code in the if statement

8
00:00:19,760 --> 00:00:23,220
if my name is equal to Max

9
00:00:23,220 --> 00:00:25,780
using the triple equality operator here

10
00:00:25,780 --> 00:00:28,250
to also check for type.

11
00:00:28,250 --> 00:00:31,030
And if I save that, I get hello,

12
00:00:31,030 --> 00:00:33,080
because of course that is equal.

13
00:00:33,080 --> 00:00:36,420
Now it's still kind of the same as hard coding true

14
00:00:36,420 --> 00:00:39,520
right in here because my name is hard coded,

15
00:00:39,520 --> 00:00:41,050
but again, let's just assume

16
00:00:41,050 --> 00:00:44,243
that this is coming from some dynamic input.

17
00:00:45,290 --> 00:00:46,650
But now that we got this

18
00:00:46,650 --> 00:00:49,430
and we know basically how that works,

19
00:00:49,430 --> 00:00:52,610
we can go back to our demo.js file.

20
00:00:52,610 --> 00:00:54,120
And in there,

21
00:00:54,120 --> 00:00:57,450
we could now alter this function a little bit

22
00:00:57,450 --> 00:01:02,280
to actually add this warning clause here,

23
00:01:02,280 --> 00:01:05,060
which is defined in the CSS file,

24
00:01:05,060 --> 00:01:09,030
to our span and to our input,

25
00:01:09,030 --> 00:01:13,380
so the two elements we store here,

26
00:01:13,380 --> 00:01:18,380
if the remaining characters here are smaller than 10.

27
00:01:19,870 --> 00:01:22,270
Definitely try this out on your own.

28
00:01:22,270 --> 00:01:24,653
We'll do it together in the next lecture.

