i

JavaScript

includes()

includes() is used to check if a string includes the specified set of characters. This method is case-sensitive. It returns true if the string includes the specified characters and false otherwise.

Example:

var string = “Hi, I am Jane.”

var isPresent = string.includes(“Jake”);

The value in the variable, isPresent, will be false because the string does not contain “Jake”.