JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" name="item-a" checked="checked" />
<input type="checkbox" name="item-b" />
<input type="checkbox" name="item-c" />

<hr />

<select multiple>
    <option value="a">a</option>
    <option value="b">b</option>
</select>

JavaScript

$('select option').each(function(i, el){
    var val = $(this).prop('value');
    $('input[name=item-'+val+']').prop('checked', 'checked');
    //$('input[name=item-'+val+']').attr('checked', true);
});