<html>
<body>
<h1>JavaScript Strings</h1>
<h2>The indexOf() Method</h2>
<p>The indexOf() method accepts a second parameter as the starting position for the search:</p>
<p id="demo"></p>
<script>
let text = "Please locate where 'locate' occurs!";
document.getElementById("demo").innerHTML = text.indexOf("locate",15);
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_string_indexof_2 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:06:49 GMT -->
</html>