Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js string contains

let example = "Example String!";
let ourSubstring = "Example";

if (str.includes(ourSubstring, 7)) {
	console.log("The word Example is in the string.");
} else {
	console.log("The word Example is not in the string");
}
Source by careerkarma.com #
 
PREVIOUS NEXT
Tagged: #js #string
ADD COMMENT
Topic
Name
4+2 =