4. if
/ else
ΒΆ
What to do when the
if
condition is false?.The
else
clause means otherwise.It is usually used to indicate complementary conditions.
The if / else conditions can be seen as a car arriving at a fork in the road.
Depending on the result of a condition, the car can take the upper or lower road.
The two codes below do the same thing but one uses if / else conditions.
You have attempted of activities on this page