From 04718c71423c70e8c3f7c683d8246f84a7ff0478 Mon Sep 17 00:00:00 2001 From: SHANICA_DENIS Date: Thu, 8 Oct 2020 16:41:50 -0400 Subject: [PATCH 1/2] #1-6 sorry forgot to commit them seperately --- fundamentals.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fundamentals.js b/fundamentals.js index 61adf3e..51c00f5 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -2,29 +2,32 @@ // #1: Create an array of strings called `foods` that contains three foods. // Type your solution immediately below this line: - +var foods = ["chicken", "beef","pork"] // #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 (i=0; i Date: Thu, 8 Oct 2020 16:49:51 -0400 Subject: [PATCH 2/2] OOJS #1 --- oojs.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/oojs.js b/oojs.js index 4c836c7..ff58529 100644 --- a/oojs.js +++ b/oojs.js @@ -5,8 +5,12 @@ // - a `songs` property that is an empty array not determined by input (not passed into the constructor) // - an `addSong` method that adds a song (string) to the `songs` array // Type your solution immediately below this line: - - +class Playlist { + constructor(title){ + this.title=title; + this.song=[addSong]; + } +}