Conditionals: Nested

Conditionals: Nested

if(member_gender=="female" && (member_age <=20 && member_age>30){
 alert('You are a valid member age and gender');
}
else if(member_gender=="male"){
 alert('Apologies but our organisation is for ladies only.');
}
else{
 alert('We are sorry but you are not the right age to join us.');
}
Comments are closed.