JSFiddle - React, Tailwind, and code Playground
HTML
<div id='content-area'>
<h1>Heading</h1>
<p>A paragraph or two</p>
<ul>
<li>item 1</li>
<li>item 2</li>
</ul>
</div>
<div id="output"></div>
JavaScript
$(function(){
var output = "";
$( "li" ).each( function( index, element ){
output += $(this).text() + " ";
});
$('#output').html(output);
});