string.includes(searchValue, start);
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p> Hello world :):) </p>
<p> This is an example of using the JavaScript's string includes() method. </p>
<script>
let str = "Welcome to the bianchenghao6.com";
document.write(" <b> The given string is: </b>", str);
document.write("<br>");
let res = str.includes('tO');
document.write(" <b> The result is: </b> ", res);
</script>
</body>
</html>
Hello world :):)
This is an example of using the JavaScript's string includes() method.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p> Hello world :):) </p>
<p> This is an example of using the JavaScript's string includes() method. </p>
<p> Here, we are searching for the substring <b> 'TO' </b> in the given string. </p>
<script>
let str = "Welcome to the bianchenghao6.com";
document.write(" <b> The given string is: </b>", str);
document.write("<br>");
let res = str.includes('TO');
document.write(" <b> The result is: </b> ", res);
</script>
</body>
</html>
Hello world :):)
This is an example of using the JavaScript's string includes() method.
Here, we are searching for the substring 'TO' in the given string.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p> Hello world :):) </p>
<p> This is an example of using the JavaScript string includes() method. </p>
<script>
let str = "Welcome to the bianchenghao6.com";
document.write(" <b> The given string is: </b>", str);
document.write("<br>");
let res = str.includes('the', 10);
document.write(" <b> The result of str.includes('the', 10) is : </b> ", res);
</script>
</body>
</html>
Hello world :):)
This is an example of using the JavaScript string includes() method.