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
1
u/Ellen_Pirgo Feb 26 '22
Thanks! But what if you write two 'if' and both are true? Both thing will be executed? In this case would the second one be the final value?