Project to study Swift 5.4
Table of Contents
In this exercise you will have to:
Take a list of names.
Add "Hello" to every name.
Make one big string with all greetings.
The solution should be one string with a comma in between every "Hello (Name)".
Examples:
greetPeople(["Joe"]) ➞ "Hello Joe"
greetPeople(["Angela", "Joe"]) ➞ "Hello Angela, Hello Joe"
greetPeople(["Frank", "Angela", "Joe"]) ➞ "Hello Frank, Hello Angela, Hello Joe"
Notes:
Each greeting has to be separated with a comma and a space.
If you're given an empty array [], return an empty string "".
Excercise from: https://edabit.com/challenges/swift
Open the file SayHellotoGuests.xcodeproj
- Xcode 12.4
- Use iPhone 12 mini as simulator
Daniel Washington Ignacio - danielvertigo@hotmail.com
Click to access my LinkedIn