main() {
if (7 % 2 == 0) {
print('7 is even');
} else {
print('7 is odd');
}
if (8 % 4 == 0) {
print('8 is divisble by 4');
}
// ternary operators
var isAlive = true;
var monday = isAlive ? 'doctor' : null;
print('monday appointment: $monday');
}
$ dart ifelse.dart
7 is odd
8 is divisble by 4
monday appointment: doctor