Courses / JavaScript
15. String.prototype.includes()
Determines whether one string may be found within another string, returning true or false as appropriate.
1 min read Chapter 15 of 99
JavaScript
String.prototype.includes()
String.prototype.includes() checks if one string contains another.
"I need to verify if a keyword exists in a user's input."
String.prototype.includes() is a method that returns true if a specified substring is found within a string, and false otherwise.
"I need to verify if a keyword exists in a user's input."
String.prototype.includes() is a method that returns true if a specified substring is found within a string, and false otherwise.