Created with <3 with dartpad.dev.
Created
August 8, 2023 02:07
-
-
Save abdorll/e6fe05e4b51b8ed62f01012c105d0737 to your computer and use it in GitHub Desktop.
glistening-waterfall-8952
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() { | |
// Create a string and an element. | |
String string = "hello"; | |
String element = "l"; | |
// Create a list to store the element. | |
List<String> list = []; | |
// Append the element to the list 4 times. | |
for (int i = 0; i < 4; i++) { | |
list.add(element); | |
} | |
// Print the list. | |
print(list); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment