I could be wrong, but if I understand correctly, I believe the example as written is correct. Here’s why:
else if statements generally run if
true. The first one is easy enough to understand at first glance: if both
vars are true, the
if statement will run.
Next line is a bit trickier however. In order to run, the condition must be
false. Why? Because there is a
! in front of it;
Perhaps important to understand in this case is "how does ‘or’ work?’'
If you look at the link you will see that if the 1st
var, or both
true it will return
true. It will only return
false if both
vars are false. This table is a quick way to check if the statement will be
In other words, the only way the
else if can run is if
iLoveLearning are both
else will only run if the user loves one but not the other.
Does that make sense?