To find out how many script tags present in the HTML page we use
document.scripts.length <p id="demo"></p>
<script></script>
<script></script>
<script>
document.getElementById('demo').innerHTML = "Number of scripts in the page are :" + document.scripts.length;
</script>
In the above code we have given three <script> tags ,
document.scripts.length finds out how many <script> we are using in the HTML page.
OUTPUT
Number of scripts are :3