04 / 17

How do you create a new Promise in JavaScript?

You can create a new Promise using the Promise constructor. It takes a function with resolve and reject parameters, representing success and failure, respectively.

javascript