Gainsight Interview Question

What are promises in Javascript?

Interview Answer

Anonymous

Aug 11, 2020

Promises are constructs in JS that make asynchronous programminng easier. Promises accept two callbacks as parameters, resolve and reject. If the promise is fulfilled, .then function is called to run the resolve function. If the promise is not resolved, reject() follows.

1