Pregunta de entrevista de Solution Design Group

In Javascript, what is a Promise used for?

Respuesta de la entrevista

Anónimo

10 jul 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.