JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" value="1" />
<input type="checkbox" value="2" />
<input type="checkbox" value="3" />
<input type="checkbox" value="4" />
<input type="checkbox" value="5" />

JavaScript

$(document).ready(function(){
    $("input[type='checkbox']").each(function(){
            if( $(this).index() % 2 == 0 ){
                $(this).attr('checked','checked');
            }
     });
});