JSFiddle - React, Tailwind, and code Playground

HTML

<a id="hellos">#</a>
<a id="hello">#</a>

JavaScript

alert($("a:not([id$='hello'])").length)