From 08815ae63c4b535205338634da083f6d491f597d Mon Sep 17 00:00:00 2001 From: christinapassafaro Date: Thu, 8 Oct 2020 16:33:41 -0400 Subject: [PATCH] finished --- fundamentals.js | 17 +++++++++++++---- oojs.js | 14 +++++++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/fundamentals.js b/fundamentals.js index 61adf3e..713bcd0 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -3,28 +3,37 @@ // #1: Create an array of strings called `foods` that contains three foods. // Type your solution immediately below this line: +var foods = ['apples', 'oranges', 'bread']; + // #2: Access the last item in the array and assign to a variable called `last`. // Type your solution immediately below this line: - +var last = foods[2]; // #3: Create an empty array called `favoriteFoods`. // Type your solution immediately below this line: - +var favoriteFoods = []; // #4: Create a `for` loop that adds each string in `foods` to `favoriteFoods`. // Type your solution immediately below this line: - +for(let i =0; i