Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript promise

const maPromesse = new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve('toto');
  }, 300);
});

maPromesse
  .then(gestionnaireSuccesA, gestionnaireEchecA)
  .then(gestionnaireSuccesB, gestionnaireEchecB)
  .then(gestionnaireSuccesC, gestionnaireEchecC);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #promise
ADD COMMENT
Topic
Name
3+5 =