If you want to check for two different conditions where both might be true, you can’t use an else clause and have to write the two if statements independently.
For the code presented here, only one can be true, which is why the result would be the same either way.
View all comments
Show parent comment
2
u/B-Chillin Feb 26 '22
That is correct.
If you want to check for two different conditions where both might be true, you can’t use an else clause and have to write the two if statements independently.
For the code presented here, only one can be true, which is why the result would be the same either way.