I have a list of items in an array. The default output of the items is a simple list separated by commas. However, a proper sentence would include the word \"and\"
Pop the last element and then add it onto the string later:
let last = myArray.popLast()
let str = myArray.joinWithSeparator(", ") + " and " + last!
Editing:
let myItem1: String = "Apple"
let myItem2: String = "Bee"
let myItem3: String = "Carrot"
let myItem4: String = "Dog"
let mySetArray = Set(arrayLiteral: myItem1, myItem2, myItem3, myItem4)
var myArray = Array(mySetArray)
let last = myArray.popLast()
let str = myArray.joinWithSeparator(", ") + " and " + last!
print(str)