diff --git a/fundamentals.js b/fundamentals.js index 61adf3e..8246a19 100644 --- a/fundamentals.js +++ b/fundamentals.js @@ -2,25 +2,29 @@ // #1: Create an array of strings called `foods` that contains three foods. // Type your solution immediately below this line: +var foods = ['apple','mole','quesadillas'] // #2: Access the last item in the array and assign to a variable called `last`. // Type your solution immediately below this line: - +foods[2]; +var last = foods[2]; // #3: Create an empty array called `favoriteFoods`. // Type your solution immediately below this line: - +favoriteFoods = []; // #4: Create a `for` loop that adds each string in `foods` to `favoriteFoods`. // Type your solution immediately below this line: - +var i = foods; +for (i= (favoriteFoods), // #5: Create an object literal called `instructor` that contains three key-value pairs. // Type your solution immediately below this line: +var instructor = {name: guap, age:27, loves:food}; diff --git a/oojs.js b/oojs.js index 4c836c7..41df87d 100644 --- a/oojs.js +++ b/oojs.js @@ -5,7 +5,7 @@ // - 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: - +var Playlist = title, songs, addSong