Let's talk about another method which is called the include.
The include method is also crucial or is also important.
So let me comment here and.
As includes as that.
Perfect.
So what does it include?
Method.
They include method determines whether a string contains in a specified string.
If it does, it returns true.
Otherwise it returns false.
So it takes two arguments.
One is a text to search, and then two is a starting point, but by default is zero.
And again, the enclosed methods is also case sensitive, meaning that if you pass in uppercase and
you are searching for lowercase, it's always going to return false.
So let's see in action.
Let me declare a variable called.
Strength for SDR is equal to.
Are you a developer?
Question I think I have declared the SDR, so let me comment out again.
Yes, this one.
So now I'll be free to use this variable.
So for this one, let's check if you is in this particular string.
So include is also very crucial or important for searching for this string.
I want to check that if there is a letter U inside this particular string and it's possible to use the
string dot includes method.
I want to search for you.
That's you insight or appears in this string.
Yes.
Because there is you inside here.
Again, it's also case sensitive.
So I pass in here as this.
There is no letter that start with uppercase y.
So let's assign the result of this one into a variable.
Core result is equal to this.
So if I console.log the result I have force because I told you includes is also case sensitive.
So to make sure that you are you are saying what are passing in is always trying.
We can turn this one to, let's say, uppercase or lowercase.
For now, let's maintain it.
So the key point here is that it is case sensitive.
That's why we got false.
The next thing is, bear in mind is that these include also take in second argument.
If you provide zero, it means that you want to search the entire string.
So by default is zero because we have zero here and then 1 to 3, right.
Because y spacing is also being counted as a string.
Okay.
So let's say that I want to start searching from, let's say de here.
So let's say zero one, two, three, four, five, six, seven, eight.
Okay.
So if I add it here, is this function going to return true or false?
Going to be false, yes.
You see, because a start from where here and we are searching for we are searching for you, which
is not part of this string.
So by default we normally bring zero or nothing at all.
And indeed I got true.
That is the include for you.
Well, in the next video let's see our first coding challenge under include.