You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Promise.resolve(value) method returns a Promise object that is resolved with the given value. If the value is a thenable (i.e. has a "then" method), the returned promise will "follow" that thenable, adopting its eventual state; if the value was a promise, that object becomes the result of the call to Promise.resolve; otherwise the returned promise will be fulfilled with the value.
Unlike old-style passed-in callbacks, a promise comes with some guarantees:
Callbacks will never be called before the completion of the current run of the JavaScript event loop.
Callbacks added with .then even after the success or failure of the asynchronous operation, will be called, as above.
Multiple callbacks may be added by calling .then several times, to be executed independently in insertion order.
when I run the following code in browser(chrome v66) that support promise native
the result is
C A
but when I run the same code with es6-promise,the result is reverse:
A C
which one is right?
The text was updated successfully, but these errors were encountered: