Skip to content

Instantly share code, notes, and snippets.

@muchirijane
Created September 26, 2019 05:45
Show Gist options
  • Save muchirijane/ae356f9550b33420a1dc954bbf176c94 to your computer and use it in GitHub Desktop.
Save muchirijane/ae356f9550b33420a1dc954bbf176c94 to your computer and use it in GitHub Desktop.
//How to use ternary operators
void main () {
int myAge = 21;
bool canIDrink = myAge >= 21 ? true : false;
print(canIDrink);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment