JSFiddle - React, Tailwind, and code Playground

HTML

<select>
    <option>Odd</option>
    <option>Even</option>
</select>

JavaScript

for (var a = 0; a < 10; a++) {
    var d = document.createElement('input');
    d.setAttribute('type','checkbox');
    d.setAttribute('id',a);
    document.body.appendChild(document.createElement('br'));
    document.body.appendChild(d);
}
var ar = ['Odd','Even'];
ar['Odd'] = [1,3,5,7,9];
ar['Even'] = [0,2,4,6,8];
$('select').change(function() {
    var t = $(this).val();
    $.each(ar[t], function(key,value) {
        $('#'+value).attr('checked',true);
    });
});