From 69f7ad26e60014b597e885cf0b9d922c9f5846e9 Mon Sep 17 00:00:00 2001 From: LILYKLOPCIC Date: Thu, 8 Oct 2020 16:06:14 -0400 Subject: [PATCH 1/6] fund 1 --- fundamentals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fundamentals.js b/fundamentals.js index 61adf3e..7f21135 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -2,7 +2,7 @@ // #1: Create an array of strings called `foods` that contains three foods. // Type your solution immediately below this line: - +var foods = ['banana', 'berry', 'grape'] // #2: Access the last item in the array and assign to a variable called `last`. // Type your solution immediately below this line: From e67bf28c94ef69d57b7cbefa6dcc576f4ca04143 Mon Sep 17 00:00:00 2001 From: LILYKLOPCIC Date: Thu, 8 Oct 2020 16:10:43 -0400 Subject: [PATCH 2/6] fund 2 --- fundamentals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fundamentals.js b/fundamentals.js index 7f21135..5e19162 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -6,7 +6,7 @@ var foods = ['banana', 'berry', 'grape'] // #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`. From 606130579db517c0ed57c081d40197be3a114948 Mon Sep 17 00:00:00 2001 From: LILYKLOPCIC Date: Thu, 8 Oct 2020 16:18:23 -0400 Subject: [PATCH 3/6] fund 4, come back to --- fundamentals.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fundamentals.js b/fundamentals.js index 5e19162..50afdeb 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -11,12 +11,14 @@ 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 < foods.length; i++) { + return favoriteFoods +} // #5: Create an object literal called `instructor` that contains three key-value pairs. From ee50c7422fa66f3bec7666035cc6db9d94f71d17 Mon Sep 17 00:00:00 2001 From: LILYKLOPCIC Date: Thu, 8 Oct 2020 16:28:52 -0400 Subject: [PATCH 4/6] fund 5 --- fundamentals.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fundamentals.js b/fundamentals.js index 50afdeb..1c1a629 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -23,7 +23,11 @@ for (let i=0; i < foods.length; i++) { // #5: Create an object literal called `instructor` that contains three key-value pairs. // Type your solution immediately below this line: - +var instructor = { + Name: 'Lily', + Month: 'October', + Day: 'Thursday' +} // #6: Add a `has-office-hours` (spelled exactly) property to `instructor` by accessing From 1ad3795ea3f8f1e162567d9054277f67ade5c1d9 Mon Sep 17 00:00:00 2001 From: LILYKLOPCIC Date: Thu, 8 Oct 2020 16:39:39 -0400 Subject: [PATCH 5/6] fund 6 --- fundamentals.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fundamentals.js b/fundamentals.js index 1c1a629..6a3d9f7 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -34,3 +34,5 @@ var instructor = { // it (do not change the original object you typed above) and assigning it // a boolean value. // Type your solution immediately below this line: +instructor['has-office-hours'] = true + From df36eb1b0368fab2d30c9f7b0816c41eeb7e25eb Mon Sep 17 00:00:00 2001 From: LILYKLOPCIC Date: Thu, 8 Oct 2020 16:57:40 -0400 Subject: [PATCH 6/6] oojs 1, fail --- oojs.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/oojs.js b/oojs.js index 4c836c7..c0128de 100644 --- a/oojs.js +++ b/oojs.js @@ -5,6 +5,16 @@ // - 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.songs = [] + } + addSong() { + this.songs.add('Almost out of time') + } + + } @@ -13,7 +23,8 @@ // #2: Create an instance of the Playlist class and set it to a variable called `myPlaylist` // Call the instance's `addSong` method to add a song to the instance's `songs` array // Type your solution immediately below this line: - +var myPlaylist = new Playlist +addSong()