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() { | |
void my_function(String a1, int a2){ | |
print("This is my function! $a1 $a2"); | |
} | |
my_function("String 1", 1); | |
my_function("String 2", 2); |
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() { | |
var my_value = true; | |
if(my_value == true){ | |
print("My value is True"); | |
}else{ | |
print("My value is False"); | |
} | |
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() { | |
for(var i = 1; i<=10; i++){ | |
print("$i"); | |
} | |
List list_1 = ["s1","s2","s3","s4","s5"]; | |
for(var i=0; i<list_1.length; i++){ |
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() { | |
var apple = FoodClass(); | |
apple.name = "Apple"; | |
apple.color = "Red"; | |
apple.calories = 100; | |
apple.isNatural = true; | |
print("${apple.name}, ${apple.calories}, ${apple.isNatural}, ${apple.color}"); | |
OlderNewer