Answers for "check if string contain another string js"

30

check if string contains a substring in JavaScript?

const string = "javascript";
const substring = "script";

console.log(string.includes(substring));  //true
Posted by: Guest on July-06-2020

Code answers related to "check if string contain another string js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language