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

Code Example 1

 document.getElementById("id").innerText = ("");

Code Example 2

<script type="text/javascript">
  /*Detects that you are using javascript or text*/

Code Example 3

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

Learn ReactJs, React Native from