Question d’entretien chez Gainsight

What are promises in Javascript?

Réponse à la question d'entretien

Utilisateur anonyme

11 août 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