JSFiddle - React, Tailwind, and code Playground

HTML

<body>
<p>Hello</p>
how are
<p>you?</p>
<button>Call remove() on paragraphs</button>
 
<script>
$( "button" ).click(function() {
   var results = $( "p" ),
       result = null,
    
       i;
    
    for(i = 0; i < results.length; i += 1)
    {
        result = results[i];
        result.remove();
    }
});
</script>
</body>