diff --git a/ArrayChallenge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ArrayChallenge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ArrayChallenge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ArrayChallenge/ShoppingList.swift b/ArrayChallenge/ShoppingList.swift index 646e1db..36bf2bb 100644 --- a/ArrayChallenge/ShoppingList.swift +++ b/ArrayChallenge/ShoppingList.swift @@ -10,13 +10,18 @@ class ShoppingList { - func createShoppingList(withItems items: [String], amountOfEachItem amounts: [String]) -> [String] { - - + func createShoppingList(withItems items: [String], amountOfEachItem amounts: [String]) -> [String] + { // Implement this function + var shoppingList: [String] = [] + for (count, item) in items.enumerated() { + + shoppingList.append("\(count + 1). \(item)(\(amounts[count]))") + + } - + return shoppingList } }