Last active
December 10, 2019 22:25
-
-
Save miquelbeltran/9823ba4e7f8344e4a00f1d12d5b2d901 to your computer and use it in GitHub Desktop.
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() { | |
var items = ['Salad', 'Popcorn', 'Toast']; | |
if (items.any((element) => element.contains('a'))) { | |
print('At least one element contains "a"'); | |
} | |
if (items.every((element) => element.length >= 5)) { | |
print('All elements have length >= 5'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment