let x=1;let y=2;
if(x==2){
//x!=2 so pass
}else
if(x==y){
//x!=y so pass
}else
if(x==1){
//x==1 so this will fire
}
with the if else only one of all possibilities will occur
sometimes however you could have multiple things be true, and false, for those you would use an array
let arr=[];
arr.push( ()=>{ if(x==2){return true;}else{return false;} } );
arr.push( ()=>{ if(x==1){return true;}else{return false;} } );
arr.push( ()=>{if(y==1){return true;}else{return false;} } );
arr.push( ()=>{if(y==2){return true;}else{return false;} } );
let answers=arr.map((functionInArray)=>{ return functionInArray(); });
//[false,true,false,true]