Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

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

Good luck and Happy Coding! Heidi