where should i put script tag in html code example

Example 1: best place to include script in html layout

JavaScript in <head> or <body>
You can place any number of scripts in an HTML document. Scripts can be placed in the <body> , or in the <head> section of an HTML page, or in both.

Example 2: html how to get js

<!--Use The <script> tag to impliment javascript. You can put script 
tags in the head or body tags or both. Though most people should put
there script tags in the head tag-->
<script>
  console.log("Javascript");
</script>