Use Promises over Callbacks, and How to Create a New Promise in Javascript

Sherlynn
The Startup
Published in
2 min readAug 18, 2019

--

Promises are widely used instead of callbacks. Promises are a great feature in Javascript that enable you to avoid callback hell, especially when you need to wait on a response from multiple API requests that are asynchronous.

A Promise is a special Javascript object that represents the eventual result of an asynchronous action. A promise…

--

--