JSFiddle - React, Tailwind, and code Playground

HTML

<input type='checkbox' id='cb1'> <label for='cb1'>Click Me</label>
<input type='checkbox' id='cb2'> <label for='cb2'>No Click Me!</label>

<br><button>Go</button>

<div id='r'></div>

JavaScript

$('button').click(function() {
    var results = [];
    
    results.push("$('#cb1').is('[checked]') is " + $('#cb1').is('[checked]'));
    results.push("$('#cb2').is('[checked]') is " + $('#cb2').is('[checked]'));
    
     results.push("$('#cb1').filter('[checked]').length is " + $('#cb1').filter('[checked]').length);
   results.push("$('#cb1, #cb2').filter('[checked]').length is " + $('#cb1, #cb2').filter('[checked]').length);
    
    results.push("$.find.matchesSelector($('#cb1')[0], '[checked]') is " + $.find.matchesSelector($('#cb1')[0], '[checked]'));
    results.push("$.find.matches('[checked]', [$('#cb1')[0], $('#cb2')[0]]).length is " + $.find.matches('[checked]', [$('#cb1')[0], $('#cb2')[0]]).length);
    
    results.push("$.find('[checked]', null, null, [$('#cb1')[0], $('#cb2')[0]]) is " + $.find('[checked]', null, null, [$('#cb1')[0], $('#cb2')[0]]));
    results.push("$.find('[checked]', null, null, [$('#cb1')[0]]) is " + $.find('[checked]', null, null, [$('#cb1')[0]]));
    
    $('input:checkbox').filter('[checked]').each(function() {
        if (!$(this).is('[checked]'))
            results.push("input " + this.id + " incorrectly included in filtered result");
    });
    
    $('#r').html(results.join('<br>'));
});