String.prototype.includes

Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more indexes that are greater than or equal to index; otherwise, returns false.

Syntax

includes(searchString, position?)

Parameters

Return value

true if the given searchString occurs at least once within this string, otherwise false.

Examples

"international".includes("nation")
true
"team".includes("I")
false