JSFiddle - React, Tailwind, and code Playground
HTML
<ul id="firstUL">
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
<ul id="secondUL">
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
CSS
.modified {
color: red;
}
JavaScript
$("#firstUL li").each(function(index) {
$($("#secondUL li").eq(index)).addClass("modified"); //corresponding element
});