I'm having trouble with an if statement with an and statement within it, how do I fix it?

Viewed 31

EDIT: MY BAD I MIXED UP THE AND OR OPPERATORS FOR JS

I'm having trouble on where I am going wrong with an and statement within an if statement, I am using the format below to try and do it.

if ((first_number < second_number) && (third_number < fourth_number)) {
   ...
}
else {
   ...
}

However, whenever the if statement is ran with both comparisons being true, it still skips to the else statement and runs that code instead of running the code in the if section. How do I fix it so that it runs the first set of code instead of the second if both statements are true?

0 Answers
Related