JSFiddle - React, Tailwind, and code Playground
HTML
<!-- example of jQuery().each() -->
<ul class="music">
<li>jazz</li>
<li class="skip">blues</li>
<li>rock</li>
<li class="skip">country</li>
<li>techno</li>
<li>metal</li>
</ul>
JavaScript
jQuery('li').each(function(index,element) {
//element = 'this'
//ignore elements with the 'skip' class
if( jQuery(element).hasClass('skip') ){return};
jQuery(element)
//show the index
.text( jQuery(element).text() + ' -> ' + index)
.css({
'background-color' : 'yellow',
'font-size' : '22px',
'font-family' : 'arial'
});
})