JSFiddle - React, Tailwind, and code Playground

HTML

<ul id="first">
    <li>should be removed</li>
    <li>should NOT be removed</li>
    <li>should NOT be removed</li>
</ul>
<ul id="second">
    <li>should be removed</li>
    <li>should NOT be removed</li>
    <li>should NOT be removed</li>
</ul>

CSS

#first { color: green; }
#second { color: red; }

JavaScript

$("#first li").filter(":nth-child(1)").remove();
$("#second li").remove(":nth-child(1)");