From 1ef4a65766c927f69129a70c8e6ccafa34158a87 Mon Sep 17 00:00:00 2001 From: jidafi Date: Mon, 17 Dec 2018 12:22:49 -0600 Subject: [PATCH] Completed --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ ArrayChallenge/ShoppingList.swift | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 ArrayChallenge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist 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..4bd2104 100644 --- a/ArrayChallenge/ShoppingList.swift +++ b/ArrayChallenge/ShoppingList.swift @@ -11,12 +11,14 @@ class ShoppingList { func createShoppingList(withItems items: [String], amountOfEachItem amounts: [String]) -> [String] { - - - // Implement this function - - - + var out: [String] = [] + for item in items { + for amount in amounts { + out.append(item + " " + "(" + amount + ")") + } + } + out.enumerated() + return out } - } +