JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="1234">
<input type="checkbox" id="2345">
<input type="checkbox" id="3456">
<input type="checkbox" id="4567">
<input type="checkbox" id="5678">

JavaScript

alert($('#1234, #2345, #3456').length);