Created
October 7, 2018 16:57
-
-
Save yunustek/927da92d372fe5159316e99051693557 to your computer and use it in GitHub Desktop.
Removing Elements from Collection
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
var numbers = [5, 6, 7, 8, 9, 10, 11] | |
numbers.removeAll(where: { $0 % 2 == 1 }) | |
// numbers == [6, 8, 10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment