Created
January 19, 2020 17:09
-
-
Save umair13adil/d0fd2658ebeba2dc91dd106a56f0ba25 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() { | |
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++){ | |
print("Item on index: $i Value: ${list_1[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() { | |
//Keep program running until list is empty | |
while(list_1.isNotEmpty){ | |
print("Print This"); | |
print("List Size: ${list_1.length}"); | |
//Remove last item from list | |
list_1.removeLast(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment