Created with <3 with dartpad.dev.
Created
October 26, 2023 01:07
-
-
Save leonus96/5300f038f8ef2695a1c98d8fdb655bde to your computer and use it in GitHub Desktop.
for-in
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() { | |
///FOR -IN: | |
///final List<int> numeros = [1, 3, 4, 6, 2, 37, 1, 4]; | |
/// For Convencional | |
/* for(int i = 0; i < numeros.length; i++) { | |
print(numeros[i]); | |
}*/ | |
/// For in: | |
/*for (int numero in numeros) { | |
print(numero); | |
}*/ | |
final List<String> alumnos = [ | |
'Joseph', | |
'Jean Pierre', | |
'Axel', | |
]; | |
for(String alumno in alumnos) { | |
print(alumno); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment