Check out example codes for "html how to get js". It will help you in understanding the concepts better.

Code Example 1

<!--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>

Learn ReactJs, React Native from akashmittal.com