check the substring in javascript using for loop 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