JavaScript String includes()
JavaScript String includes()
The includes() method is used to return true if a string contains a specified string else it will return false. This method is case-sensitive.
Syntax:-
Its syntax is:- string.includes(searchvalue, start)
Return:-
Its return is:- true if the string contains the value else false
Further Explanation:-
Parameter | Description |
searchvalue | Required. The string to search for. |
start | Optional. The position to start from. |