JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" value="1" class="user_name">1<br>
<input type="checkbox" value="2" class="user_name">2
JavaScript
var chk1 = $("input[type='checkbox'][value='1']");
var chk2 = $("input[type='checkbox'][value='2']");
chk1.on('change', function(){
chk2.prop('checked',this.checked);
});