JavaScript Asynchronous Programming with JavaScript Understanding Promises Create a Promise Review

const dataPromise = new (); i need help with this

i need help with this

2 Answers

Raphel Banda
Raphel Banda
6,861 Points

const dataPromise = new Promise();

remember to use P instead of p

Heidi Fryzell
.a{fill-rule:evenodd;}techdegree seal-36
Heidi Fryzell
Front End Web Development Treehouse Moderator 21,764 Points


For this task the instructions want you to complete the code by defining the constructor that creates a promise.

This is done by using the "new" keyword followed by the Promise() constructor function.

const dataPromise = new Promise();

Here is a video where Guil goes over this:

Good luck and Happy Coding! Heidi