dimanche 22 mars 2015

Javascript if statements wont work

hello if I chain my if statements like this



if (b4 < y2 || y1 > b4 || r4 < x2 || x4 > r2) {
return true;
}
else {
return false;
}
if (b4 < y1 || y1 > b4 || r4 < x1 || x4 > r1) {
return true;
}
else {
return false;
}
if (b4 < y3 || y3 > b4 || r4 < x3 || x4 > r3) {
return true;
}
else {
return false;
}


none of them seem to work, but if I put just one of those that one does work. Like this: `



if (b4 < y2 || y1 > b4 || r4 < x2 || x4 > r2) {
return true;
}
else {
return false;
}


I have no clue why.


Aucun commentaire:

Enregistrer un commentaire