Région de recherche :

Date :

https://developer.mozilla.org › fr › docs › Web › JavaScript › Reference › Global_Objects › Promise › then

Promise.prototype.then() - JavaScript | MDN - MDN Web Docs

La méthode then() renvoie un nouvel objet Promise, ce qui permet d'enchaîner les appels aux méthodes des promesses. Si la fonction passée à then() comme gestionnaire renvoie un objet Promise, une promesse équivalente sera exposée à l'appel à then() qui suit.

https://www.w3schools.com › jsref › jsref_promise_then.asp

JavaScript Promise then() Method - W3Schools

Learn how to use the then() method to handle the fulfilled and rejected states of a promise in JavaScript. See the syntax, parameters, return value, description and browser support of then() method.

https://developer.mozilla.org › ... › Web › JavaScript › Reference › Global_Objects › Promise › then

Promise.prototype.then() - JavaScript | MDN - MDN Web Docs

Learn how to use the then() method of Promise instances to handle the fulfillment or rejection of a promise. See syntax, parameters, return value, description, examples, and browser compatibility of then().

https://stackoverflow.com › questions › 3884281

What does the function then () mean in JavaScript?

then() function is related to "Javascript promises" that are used in some libraries or frameworks like jQuery or AngularJS. A promise is a pattern for handling asynchronous operations. The promise allows you to call a method called "then" that lets you specify the function(s) to use as the callbacks.

https://developer.mozilla.org › fr › docs › Web › JavaScript › Guide › Using_promises

Utiliser les promesses - JavaScript | MDN - MDN Web Docs

La méthode then () renvoie une nouvelle promesse, différente de la première : js. const promise = faireQqc (); const promise2 = promise.then (successCallback, failureCallback); ou encore : js. const promise2 = faireQqc ().then (successCallback, failureCallback);

https://www.w3schools.com › Js › js_promise.asp

JavaScript Promises - W3Schools

Learn how to use JavaScript Promises to handle asynchronous code with then() method. See examples of promises for timeouts, files, and errors.

https://masteringjs.io › tutorials › fundamentals › then

The Promise then() Function in JavaScript - Mastering JS

Learn how to use the then() function to handle asynchronous operations with promises in JavaScript. See examples of then() with fulfilled, rejected, and chained promises, and how to use catch() as a shorthand for then().

The Promise then() Function in JavaScript - Mastering JS

https://fr.javascript.info › promise-basics

Promesse (promise) - JavaScript

Le premier argument de .then est une fonction qui se lance si la promesse est tenue, et reçoit le résultat. Le deuxième argument de .then est une fonction qui se lance si la promesse est rompue, et reçoit l’erreur. Par exemple, voyons la réponse à une requête correctement tenue :

https://runebook.dev › fr › docs › javascript › global_objects › promise › then

JavaScript - promise.then [fr] - Runebook.dev

La méthode then() planifie les fonctions de rappel pour l'achèvement éventuel d'un Promise — soit l'exécution, soit le rejet.

https://www.pierre-giraud.com › javascript-apprendre-coder-cours › promesse-promise

Les promesses en JavaScript - Pierre Giraud

Exploiter le résultat d’une promesse avec les méthodes then() et catch() Pour obtenir et exploiter le résultat d’une promesse, on va généralement utiliser la méthode then() du constructeur Promise.