Pergunta de entrevista da empresa Gainsight

What are promises in Javascript?

Resposta da entrevista

Sigiloso

11 de ago. de 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