Question d’entretien chez Solution Design Group

In Javascript, what is a Promise used for?

Réponse à la question d'entretien

Utilisateur anonyme

10 juil. 2023

A Promise is used for guaranteeing a value is returned from code execution, typically one that is asynchronous. This can be done with the Promise function, async/await, or generator functions. A well known use case for Promises are for handling execution of HTTP requests.