- Building web server and its interactive functions
- Animations and graphics, adding special effects to web components
- Validating forms and exception errors
- Adding behavior and functionalities to web pages
Note that the includes() method is case sensitive, which means that Uppercase and Lowercase characters are treated differently.
Parameters that were used:
The string in which the search will take place is called the search value.
start: This is where the search will begin to be processed (although this parameter is not necessary if this is not mentioned the search will begin from the start of the string).
Returns either a Boolean true or false indicating the presence or absence of something.
Input : Welcome to Codedamn.
Output : true
Explanation: Because the second argument isn’t set, the search will begin at the beginning index. And it will look for the word Geeks in the string, and if it is found, it will return true.
Input: Welcome to Codedamn.
Explanation: Because the second argument is not defined in this situation, the search will begin from the beginning index. However, because this function is case-sensitive, the two texts will be treated differently, resulting in a boolean false.
Because it’s case-sensitive.
If an array contains a specified value, the includes() function returns true.
If the value cannot be retrieved, the includes() method returns false.
The case is important when using the includes() function.
The value to search for.
Start position. Default is 0.
If you have any queries or feedback do let us know in the comment section.
Free money-back guarantee
Unlimited access to all platform courses
100's of practice projects included
ChatGPT Based Instant AI Help (Jarvis)
Structured Full-Stack Web Developer Roadmap To Get A Job
Exclusive community for events, workshops
Sharing is caring
Did you like what Vishnupriya wrote? Thank them for their work by sharing it on social media.