I have a concise if/else statement below:
function () {
if (elem.attr('data-src-1') === '' && elem.attr('data-src-2') === '') {
// scenario a
} else if (elem.attr('data-src-1') === '' && elem.attr('data-src-2') !== '') {
// scenario b
} else if (elem.attr('data-src-1') !== '' && elem.attr('data-src-2') === '') {
// scenario c
} else {
// scenario d
}
}
which is returning a complexity of 7 by strict linting rules. I need to reduce its complexity to 6 but can't see how to make it more concise?