1
00:00:00,690 --> 00:00:04,050
Let me show you how I'm going to solve this particular challenge.

2
00:00:04,050 --> 00:00:05,190
So let me comment out.

3
00:00:05,190 --> 00:00:06,090
This one's.

4
00:00:08,200 --> 00:00:08,760
Yes.

5
00:00:08,770 --> 00:00:09,670
Now I'm back.

6
00:00:09,790 --> 00:00:16,990
So the whole logic of this function is to check if a certain strain contains some whitespace.

7
00:00:17,110 --> 00:00:18,940
So here we go.

8
00:00:19,660 --> 00:00:25,870
I'm going to use function statement to create this function, so I'll make it as function here.

9
00:00:27,070 --> 00:00:32,800
Function and now the name of my function as contained.

10
00:00:33,920 --> 00:00:36,230
Contains whitespace.

11
00:00:37,540 --> 00:00:45,510
Now my parentheses and my calibrates the function should take in a string so I'll pass in here a string

12
00:00:45,520 --> 00:00:46,240
I want to check.

13
00:00:46,240 --> 00:00:52,360
The next point is that the function should return true if the string contains whitespace and force if

14
00:00:52,360 --> 00:00:53,260
it has not.

15
00:00:53,440 --> 00:00:58,210
So I'll bring in my return keyword here.

16
00:00:58,210 --> 00:01:08,320
And on the string we have a method called index of remember guys we use index or to determine at which

17
00:01:08,320 --> 00:01:12,100
point does a certain character exist.

18
00:01:12,100 --> 00:01:14,440
So here we can say, I want to check for see.

19
00:01:15,170 --> 00:01:17,990
In the spring we are going to pass into this function.

20
00:01:18,230 --> 00:01:21,500
But this time around I'm going to check for empty string.

21
00:01:22,040 --> 00:01:31,370
So if it exists, meaning that if the result of this one is not equal to negative one, meaning it exists.

22
00:01:31,490 --> 00:01:34,190
Therefore this function is going to return.

23
00:01:34,190 --> 00:01:34,730
True.

24
00:01:34,760 --> 00:01:35,660
So let's see.

25
00:01:35,930 --> 00:01:38,930
Let's call the function uncertainty variable.

26
00:01:39,840 --> 00:01:43,680
Variable called result is equal to contains whitespace.

27
00:01:43,680 --> 00:01:46,530
So then pass in, let's say John.

28
00:01:48,520 --> 00:01:53,290
Dysfunction will tend through of us because John doesn't have some whitespace.

29
00:01:53,410 --> 00:01:53,710
Right?

30
00:01:53,710 --> 00:01:55,660
So let's see if I save it.

31
00:01:55,690 --> 00:01:59,080
It's false because this one has new whitespace.

32
00:01:59,320 --> 00:02:01,540
If I bring some whitespace here, let's see.

33
00:02:01,540 --> 00:02:02,800
Now I have.

34
00:02:02,800 --> 00:02:03,340
True.

35
00:02:04,000 --> 00:02:05,140
That is it, guys.

