Skip to content

Instantly share code, notes, and snippets.

@Hiyorimi
Created July 8, 2020 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hiyorimi/cf1669c13818f9a5d5d5e7cc0dc4c63e to your computer and use it in GitHub Desktop.
Save Hiyorimi/cf1669c13818f9a5d5d5e7cc0dc4c63e to your computer and use it in GitHub Desktop.
void main() {
var example9Array = const ["a", "b"];
example9() {
for (int i = 0; i < example9Array.length; i++) {
print("Example9 for loop '${example9Array[i]}'");
}
var i = 0;
while (i < example9Array.length) {
print("Example9 while loop '${example9Array[i]}'");
i++;
}
for (final e in example9Array) {
print("Example9 for-in loop '${e}'");
}
example9Array.forEach((e) => print("Example9 forEach loop '${e}'"));
}
example9();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment