Last active
January 10, 2022 20:25
-
-
Save felipecastrosales/cb8db5110d465897ca78f2037e8285e6 to your computer and use it in GitHub Desktop.
Condicionais - Intro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var firstCondition = true; | |
var secondCondition = (true && true); | |
if (firstCondition) { | |
// Primeira condição cumprida | |
print('caiu no if'); | |
} else if (secondCondition) { | |
// Segunda condição cumprida e primeira não | |
print('caiu no else if'); | |
} else { | |
// Caso one nenhuma das duas condições foi cumprida | |
print('caiu no else'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment