Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to check whether a string contains a substring in JavaScript?

There is a String.prototype.includes in ES6:

"potato".includes("to")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #check #string #substring
ADD COMMENT
Topic
Name
4+2 =