Created
June 1, 2022 06:38
-
-
Save mj-hd/8e6dfae5563935294b0389033cb3c613 to your computer and use it in GitHub Desktop.
dart_switch_loop.dart
This file contains 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() { | |
int a = 0; | |
// equivalent to while | |
first: | |
switch (a) { | |
second: | |
default: | |
a++; | |
switch (a) { | |
case 10: | |
print('$a!!'); | |
break first; | |
default: | |
print('$a'); | |
continue second; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment