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
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Heidi Fryzell
Front End Web Development Treehouse Moderator 21,764 Points

Hello,

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: https://teamtreehouse.com/library/create-a-promise

Good luck and Happy Coding! Heidi