Check out example codes for "html script tag". It will help you in understanding the concepts better.

Code Example 1

<script src="javascript.js"></script>

Code Example 2

<script>
	// Put JavaScript inside here
</script>

Code Example 3

<script>
	//JavaScript here
</script>

Code Example 4

<script src="javascript.js"></script>

Code Example 5

<script>
  //Insert JS scripts here
  var html
  html = "You can use the <script> tag to incorporate JS code into your HTML code"
  console.log(html)
</script>

Code Example 6

<script>
document.getElementById("demo").innerHTML = "Hello JavaScript!";

 </script>

Learn ReactJs, React Native from akashmittal.com