Is it feasible to use if conditions instead of utilizing return when dealing with multiple conditions in our program?
var v2=[12,23,44,3,1,3,456,78,22];
function checkresult(v2) {
return v2 >= 18;
}
var a = v2.filter(checkresult);
document.getElementById("demo").innerHTML = a;