Playing with conditional
What if today was raining? maybe you using jacket or umbrella, but, what if today are sunny?, you maybe wearing short pants or using sunglasses. We can play it with conditional statement.
// let's we create some example
var today_raining: bool = false;
if (today_raining) {
print("wear jacket or use umbrella");
} else {
print("use sunglasses");
}
if (!today_raining) {
print("use sunglasses");
} else {
print("wear jacket");
}
if statement are keyword using for conditional are true, statement on block inside statement will execute and write to stdout, and if statement are false, else conditional are execute it.
[!NOTE] print will support with or without parentheses (round bracket).