var shoppingList = ["Eggs", "Milk"]
shoppingList.append("Flour")
shoppingList += ["Baking Powder"]
shoppingList += ["Chocolate Spread", "Cheese", "Butter"]
shoppingList[0] = "Six eggs"
shoppingList[4...6] = ["Bananas", "Apples"]
shoppingList.insert("Maple Syrup", at: 6)
shoppingList.remove(at: 4)
shoppingList.removeLast()
print(shoppingList)
var result = 0
for i in 0...4 {
if i == 3 {
result += 10
} else {
result += i
}
}
print(result)