Having an unpredicted outcome using the && logical operator. If I link more than 2 expressions, the if clause fails. Is there some limit to the number of expressions that can be concatenated using &&?
if (tTellerProN.checked && tCareProN.checked && tSalesProN.checked) {
$(flListEmpty).empty();
$(flListEmpty).append($('<option></option>').val(0).html("Select Role"));
$('.fl_list1 .list4').each(function (index) {
$(flListEmpty).append($('<option> </option>').val(index).html($(this).text()));
})
}
No, there is no limit. Your expression requires that all three
checkedvalues aretrue, otherwise it will return false. One of them must befalse(or nottrue), that’s why yourifis failing.For the record:
&&is part of the javascript language, not the jQuery library.