Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js string does not contain

"this is the string".indexOf("cake"); // -1 (does not contain)
"this string has cake".indexOf("cake"); // 16 (contains)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #string
ADD COMMENT
Topic
Name
8+6 =