mardi 23 octobre 2018

What does the slash at the end of the parameter in javascript mean?

Below code has '/' at the end of the parameters. What does it mean?

Code extracted from https://guides.emberjs.com/v2.14.0/tutorial/autocomplete-component/

this.get('/rentals', function(db, request/) {
  if(request.queryParams.city !== undefined/) {
    let filteredRentals = rentals.filter(function(i/) {
      return i.attributes.city.toLowerCase().indexOf(request.queryParams.city.toLowerCase()) !== -1;
    });
    return { data: filteredRentals };
  } else {
    return { data: rentals };
  }
});




Aucun commentaire:

Enregistrer un commentaire