for (var i in checkboxMap)
// console.log('.'+checkboxMap[i]);
$('.'+checkboxMap[i]).addClass('selected');
$('.'+checkboxMap[i]+' input').attr('checked', 'true');
}
<ul>
<li class="genre-comedy">
<input class="input_box" type="checkbox">
Комедии</li>
<li class="genre-drama">
<input class="input_box" type="checkbox">
Драмы</li>
<li class="genre-horror">
<input class="input_box" type="checkbox">
Ужасы</li>
</ul>
var checkboxMap = ['genre-comedy','genre-drama'];
for (var i in checkboxMap)
{ // console.log('.'+checkboxMap[i]);
$('.'+checkboxMap[i]).addClass('selected');
$('.'+checkboxMap[i]+' input').attr('checked', 'true');
}