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

Code Example 1

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

 </script>

Code Example 2

<script>
	//JavaScript here
</script>

Learn ReactJs, React Native from akashmittal.com