Top "Promise" questions

Promises are a tactic for deferred computing, suitable for several styles of concurrency: thread and event loop concurrency for local computation, and both synchronous and asynchronous remote messaging.

Handling multiple catches in promise chain

I am still fairly new to promises and am using bluebird currently, however I have a scenario where I am …

javascript node.js promise bluebird
Returning an Axios Promise from function

Can someone please explain why returning an Axios promise allows for further chaining, but returning after applying a then()/catch() …

javascript promise axios
angular $q, How to chain multiple promises within and after a for-loop

I want to have a for-loop which calls async functions each iteration. After the for-loop I want to execute another …

angularjs promise angular-promise deferred
How to return many Promises and wait for them all before doing other stuff

I have a loop which calls a method that does stuff asynchronously. This loop can call the method many times. …

javascript promise ecmascript-6 es6-promise
What does $.when.apply($, someArray) do?

I'm reading about Deferreds and Promises and keep coming across $.when.apply($, someArray). I'm a little unclear on what this …

javascript jquery asynchronous promise
How to handle the if-else in promise then?

In some case, when I get a return value from a promise object, I need to start two different then() …

node.js asynchronous promise
While loop with promises

What would be the idiomatic way to do something like a while loop with promises. So: do something if the …

node.js loops promise q
Why is 'this' undefined inside class method when using promises?

I have a javascript class, and each method returns a Q promise. I want to know why this is undefined …

javascript node.js promise this q
How to always run some code when a promise is fulfilled in Angular.js

In my Angular.js application, I'm running some asynchronous operation. Before it starts I cover the application with a modal …

javascript angularjs promise deferred finally
Use promise to process MySQL return value in node.js

I have a python background and is currently migrating to node.js. I have problem adjusting to node.js due …

mysql node.js asynchronous promise node-mysql