updateRestaurants() {
    const cSelect = document.getElementById('cuisines-select');
    const nSelect = document.getElementById('neighborhoods-select');

    const cIndex = cSelect.selectedIndex;
    const nIndex = nSelect.selectedIndex;

    const cuisine = cSelect[cIndex].value;
    const neighborhood = nSelect[nIndex].value;

    DBHelper.fetchRestaurantByCuisineAndNeighborhood(cuisine, neighborhood, (error, restaurants) => {
      if (error) { // Got an error!
        console.error(error);
      } else {
        this.resetRestaurants(restaurants);
        this.fillRestaurantsHTML();
      }
    })
  }
/**
   * Update page and map for current restaurants.
   */
Update page and map for current restaurants.
Update page and map for current restaurants .
updateRestaurants() {
    const cSelect = document.getElementById('cuisines-select');
    const nSelect = document.getElementById('neighborhoods-select');
    const cIndex = cSelect.selectedIndex;
    const nIndex = nSelect.selectedIndex;
    const cuisine = cSelect[cIndex].value;
    const neighborhood = nSelect[nIndex].value;
    DBHelper.fetchRestaurantByCuisineAndNeighborhood(cuisine, neighborhood, (error, restaurants) => {
      if (error) { 
        console.error(error);
      } else {
        this.resetRestaurants(restaurants);
        this.fillRestaurantsHTML();
      }
    })
  }
updateRestaurants ( ) { const cSelect = document . getElementById ( 'cuisines-select' ) ; const nSelect = document . getElementById ( 'neighborhoods-select' ) ; const cIndex = cSelect . selectedIndex ; const nIndex = nSelect . selectedIndex ; const cuisine = cSelect [ cIndex ] . value ; const neighborhood = nSelect [ nIndex ] . value ; DBHelper . fetchRestaurantByCuisineAndNeighborhood ( cuisine , neighborhood , ( error , restaurants ) => { if ( error ) { console . error ( error ) ; } else { this . resetRestaurants ( restaurants ) ; this . fillRestaurantsHTML ( ) ; } } ) }
Update page and map for current restaurants.
Update page and map for current restaurants .
// Got an error!