FrontEnd.ro logo
Ce este un Promise?
orderFood()
  .then((food) => {
    console.log(`Nom nom. Eating ${food}...`);
  })
  .catch((reason) => {
    console.log(`Hey guys, the delivery got cancelled because ${reason}.`);
    console.log('Do we have anything in the fridge?');
  });