Région de recherche :

Date :

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

Promise - JavaScript | MDN - MDN Web Docs

L'objet Promise (pour « promesse ») est utilisé pour réaliser des traitements de façon asynchrone. Une promesse représente une valeur qui peut être disponible maintenant, dans le futur voire jamais. Note: Cette fonctionnalité est disponible via les Web Workers.

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

JavaScript Promises - W3Schools

A JavaScript Promise object can be: The Promise object supports two properties: state and result. While a Promise object is "pending" (working), the result is undefined. When a Promise object is "fulfilled", the result is a value. When a Promise object is "rejected", the result is an error object.

https://developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Promise

Promise - JavaScript | MDN - MDN Web Docs

The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value. To learn about the way promises work and how you can use them, we advise you to read Using promises first.

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

Utiliser les promesses - JavaScript | MDN - MDN Web Docs

Une promesse est un objet (Promise) qui représente la complétion ou l'échec d'une opération asynchrone. La plupart du temps, on « consomme » des promesses et c'est donc ce que nous verrons dans la première partie de ce guide pour ensuite expliquer comment les créer.

https://javascript.info › promise-basics

Promise - The Modern JavaScript Tutorial

A Promise object serves as a link between the executor (the “producing code” or “singer”) and the consuming functions (the “fans”), which will receive the result or error. Consuming functions can be registered (subscribed) using the methods .then and .catch.

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

Les promesses en JavaScript - Pierre Giraud

Une promesse en JavaScript est un objet qui représente l’état d’une opération asynchrone. Une opération asynchrone peut être dans l’un des états suivants : Opération en cours (non terminée) ; Opération terminée avec succès (promesse résolue) ; Opération terminée ou plus exactement stoppée après un échec (promesse rejetée).

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

JavaScript Promise Object - W3Schools

The Promise Object represents the completion or failure of an asynchronous operation and its results. A Promise can have 3 states: Example.

https://stackoverflow.com › questions › 27746304

How to check if an object is a Promise? - Stack Overflow

To see if the given object is a ES6 Promise, we can make use of this predicate: function isPromise(p) { return p && Object.prototype.toString.call(p) === "[object Promise]"; } Calling toString directly from the Object.prototype returns a native string representation of the given object type which is "[object Promise]" in our case ...

https://www.freecodecamp.org › news › javascript-promises-explained

JavaScript Promises Explained - freeCodeCamp.org

What is a promise in JavaScript? JavaScript is single threaded, meaning that two bits of script cannot run at the same time; they have to run one after another. A Promise is an object that represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.

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

Promesse (promise) - JavaScript

Une promesse (promise) est un objet spécial en JavaScript qui lie le “producteur de code” et le “consommateur de code” ensemble. En comparant à notre analogie c’est la “liste d’abonnement”.