Skip to content

Commit

Permalink
ga-wdi-exercises#1-6 sorry forgot to commit them seperately
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicanikad committed Oct 8, 2020
1 parent 284c9c1 commit 04718c7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions fundamentals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<foods; i++){
console.log(favoriteFoods[i])
}


// #5: Create an object literal called `instructor` that contains three key-value pairs.
// Type your solution immediately below this line:

var instructor={}


// #6: Add a `has-office-hours` (spelled exactly) property to `instructor` by accessing
// it (do not change the original object you typed above) and assigning it
// a boolean value.
// Type your solution immediately below this line:
var instructor={
"has-office-hours": true
}

0 comments on commit 04718c7

Please sign in to comment.