Let me show you how I'm going to solve this particular challenge.
So let me comment out.
This one's.
Yes.
Now I'm back.
So the whole logic of this function is to check if a certain strain contains some whitespace.
So here we go.
I'm going to use function statement to create this function, so I'll make it as function here.
Function and now the name of my function as contained.
Contains whitespace.
Now my parentheses and my carry the function should take in a string, so I'll pass in here a string
I want to check.
The next point is that the function should return true if the string contains whitespace and force.
If it does not.
So I'll bring in my return keyword here.
And on the string we have a method called index of remember guys we use index or to determine at which
point does a certain character exist.
So here we can say, I want to check for C in the string we are going to pass into this function.
But this time around I'm going to check for empty string.
So if it exists, meaning that if the result of this one is not equal to negative one, meaning it exists.
Therefore this function is going to return.
True.
So let's see.
Let's call the function assigned to variable.
Variable core result is equal to contains whitespace.
So let it pass in, let's say John.
This function will tend true of us because John doesn't have some whitespace.
Right?
So let's see if I save it.
It's false because this one has new whitespace.
If I bring some whitespace here, let's see.
Now I have.
True.
That is it, guys.