title: Does reduce not work with jQuery? How to count elements in a const variable?
body: <p>I#d like to create a const variable that is equal to the number of checked checkboxes with a certain class. This is my code to do that(which is not working):</p>
  <pre><code>const blocksUserAddLineCBs = $(&quot;.useradd&quot;+blockIdEnding);
  const blocksUserAddLinesActiveCBCounter = blocksUserAddLineCBs.reduce((currentTotal, item) =&gt; {
      return $(item).prop('checked') === true + currentTotal;
  }, 0);
  </code></pre>
  <p>Is the reduce method not working with a Field created with a jQuery Selector? How could i that without having to create a let Variable and a $().each Loop which increases the variable every time it recognizes one of the elements is checked <code>($(this).prop('checked'))</code></p>