Check out example codes for "make text bold js". It will help you in understanding the concepts better.

Code Example 1

<button onclick="myFunction()">Try it</button>

<p >Make text bold <span id="demo">Text Bold</p>

<script>
function myFunction() {
  document.getElementById("demo").style.fontWeight = "900";
}
</script>

Learn ReactJs, React Native from akashmittal.com