if
...else
Statement
If we want to do something else if the condition is false, we can use the else statement with if statement to execute a block of code when the condition is false. |
|
|
|
if else
(Ternary Operator)
if
, and one for else
, you can put it all on the same line:
|
|
“Knowing others is intelligence; knowing yourself is true wisdom. Mastering others is strength; mastering yourself is true power.” ― Lao Tzu, Tao Te Ching |