Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
Prev Previous commit
Next Next commit
arrays of objects inlass execise completed
  • Loading branch information
bireworld committed Jul 18, 2020
commit b626eb6d4877be8939c24b8f752da50201cd666b
12 changes: 3 additions & 9 deletions Week-1/InClass/E-arrays-of-objects/exercise-3.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,9 @@ let restaurantFinderApplication = {
return restaurants.filter(menus=>menus.menu.includes(dishName)).map(names=>names.name)
},
countNumberOfRestaurantsInArea: function (area){
let count = 0
for(let area in restaurants.address){
if(address.area==='center'|| 'west'){
count++

}
}
return count
// Complete here
return restaurants.filter(menus=>menus.address.area===area).length

// Complete here
}
};

Expand Down