Created
February 10, 2023 15:30
-
-
Save LokieVikky/8eec53f94eff80af5c65718cf80f646d to your computer and use it in GitHub Desktop.
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() { | |
// // if(condition){ | |
// // code block | |
// // } | |
// int a = 30; | |
// int b = 20; | |
// if (a == 10) { | |
// print('a==10'); | |
// } else if (a == 20) { | |
// print('a==20'); | |
// } else { | |
// print('else'); | |
// } | |
// switch (a) { | |
// case 10: | |
// print('a is 10'); | |
// break; | |
// case 20: | |
// print('a is 20'); | |
// break; | |
// default: | |
// print('default'); | |
// } | |
// // ternary operator | |
// // condition?'':'' | |
// String test = a == 30 ? 'a is 30' : 'a is not 30'; | |
// int c = a == 30 ? 30 : 40; | |
// String? test2 = null; | |
// String test3 = test2??'test2 is null'; | |
// print(test3); | |
// if (a == 30) { | |
// test = 'a is 30'; | |
// } else { | |
// test = 'a is not 30'; | |
// } | |
// // syntax | |
// // while(){ | |
// // } | |
int i = 1; | |
print('Start'); | |
while (i <= 10) { | |
print(i); | |
i++; | |
} | |
print('End'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment