Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gotenxds's full-sized avatar

David limkys gotenxds

  • none
  • Israel
View GitHub Profile
async function doStuff(){
try {
  return await rainSomeCatsAndDogs();
  } catch(someCatsAndDogs) {
  // do something;
  }
}
async function doStuff(){
try {
const result = await rainSomeCatsAndDogs();
return result();
  } catch(someCatsAndDogs) {
  // do something;
  }
}
funcation someOperation(){
return Promise.all(getDogs(), getCats())
.then([dogs, cats] => makeItRain(cats, dogs))
.then(openAnimalProffUmbrella);
}
public boolean checkPermissions()
{
// validDate is necessary in order for a permission to be valid.
return prem.validDate == currentDate &&
prem.allowedToFetch(id) &&
prem.type == PremissionType.Admin;
}