Created
May 20, 2019 07:54
-
-
Save saru2020/61c6c5d7ba2117950e9ba6f58d634d14 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
//Get just the name of the contacts into a separate array | |
//Imperative Programming | |
var contactNamesImp = [String]() | |
for contact in contacts { // for each | |
contactNamesImp.append(contact.firstName) | |
} | |
print(contactNamesImp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment