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

Code Example 1

$("span").html("");

Learn ReactJs, React Native from akashmittal.com