About 51 results
Open links in new tab
  1. Understanding JavaScript promise object - Stack Overflow

    Sep 13, 2016 · A promise in Javascript is an object which represent the eventual completion or failure of an asynchronous operation. Promises represent a proxy for a value which are getting in some point …

  2. O que são promises (promessas) em JavaScript?

    Mar 24, 2016 · Estava pesquisando sobre callback em JavaScript quando achei esta questão: Como realmente aprender a usar promises (promessas) em javascript? Mas afinal : O que são promessas? …

  3. How can I access the value of a promise? - Stack Overflow

    And, for clarity, the return value of the function doSomething in this example is still a promise - because async functions return promises. So if you wanted to access that return value, you would have to do …

  4. javascript - How to use Promise.all correctly? - Stack Overflow

    Jun 11, 2019 · The Promise.all will resolve once both of these functions have completed. So yes, both result1 and result2 are guaranteed to be defined (or, at least, to have been assigned to) when the …

  5. javascript - Promise is returning [object Promise] - Stack Overflow

    0 Promise is returning [object Promise] then it returns a null value. check the collection of mongo DB and ensure accessing path is correct.

  6. javascript - How to get Result from a Promise object? - Stack Overflow

    Apr 7, 2022 · The solution is to simply await the Promise: get a promise back var prom=(async function(){ return 1; })(); and then get the returned value: var val = await prom;. val is set to the async …

  7. javascript - Why is my asynchronous function returning Promise ...

    The promise resolution procedure is an abstract operation taking as input a promise and a value, which we denote as [ [Resolve]] (promise, x). If x is a thenable, it attempts to make promise adopt the state …

  8. javascript - Promise inside promise: what's the correct way to return a ...

    May 10, 2017 · Promise inside promise: what's the correct way to return a variable from the child promise? (JS) Asked 8 years, 9 months ago Modified 4 years ago Viewed 107k times

  9. javascript - Understanding JS Promises - Stack Overflow

    Dec 24, 2014 · The promise resolution process in the Promises/A+ specification contains the following clause: onFulfilled or onRejected returns a value x, run the Promise Resolution Procedure [ …

  10. javascript - Create an empty promise that just fulfills ... - Stack ...

    Jun 28, 2016 · The Promise constructor requires an executor function in its parameter. If you just need a dummy promise, then you can use Promise.resolve() instead of new Promise().