inbuilt function to check substring in mainstring in js code example
Example: check for substring javascript
const string = "javascript";
const substring = "script";
console.log(string.includes(substring)); //true
const string = "javascript";
const substring = "script";
console.log(string.includes(substring)); //true