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

karan Badhwar
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
karan Badhwar
Web Development Techdegree Graduate 18,135 Points

Do i need to remember this ?

Everything went over me, feels like the concept was thrown instead of explained, can somebody help me understand this concept, what is happening ?

I kind of feeling scared about moving forward after every video, that I might get stuck there for hours, and end up getting frustrated, I am not sure what should I do ?

4 Answers

Hi Karan, everything is hard at the beginning, especially when you are new to the concept, just keep in mind that you can also try to think on paper, so the concept sticks, and as you use it more often, it will be easier to understand, I went through the same when I started python here at Treehouse and now, it just sounds too easy.

Also, no programmer remembers everything in the language of their choice, you can go back to it at anytime when you need it , as long as you know that it is possible with your specific programming language an then revisit it as you need any refresher, also try to use it as offen as possible, so that is easier to remember next time.

karan Badhwar
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
karan Badhwar
Web Development Techdegree Graduate 18,135 Points

Hey Sergio Andrés Herrera Velásquez , thanks for the motivational message, hope that happens with me too, at the moment am bit scared, but hoping everything will eventually fall into right place as it happened with you

josephpatrickpotot
josephpatrickpotot
17,959 Points

Do not skip anything at this point. If anything is not clear better do further reading or repeat the video as if it will be highly relevant later on in the course.

karan Badhwar
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
karan Badhwar
Web Development Techdegree Graduate 18,135 Points

Hi josephpatrickpotot , Thankyou for the advice, but sometimes It gets really hard to understand and in the videos too, they bring up some new terms, which are not explained, so had to watch the same video again and again!!

I spent about 2 whole days or 16 hours on Promises when first learning. Now almost a year later I am still going over the course as a refresher and to 'fill in the missing gaps', although i'm much more comfortable than I was before.

Something like asynchronous programming is quite technical in principle. You don't necessarily have to remember all the technical details, but a 'good enough' understanding of the concepts of asynchronous programming is very important to working as a web developer (that is to say, a programmer or engineer who uses web technologies), in my opinion.

The important part is to create an 'internal working model' of how asynchronous programming works in the JavaScript runtime environment -- hence why this course starts with animated diagrams of the call stack, callback queue, event loop, etc.

My advice is:

  • Practice: Make small projects where you try to create an asynchronous program, and log different values to the console to see what is happening inside your program at different points. Test your hypotheses about how this all works.
  • Examine the topic from multiple angles: There are lots of tutorials on YouTube, etc, that will explain asynchronous programming in JavaScript in different ways. This can be very useful in giving a broad understanding of how this all actually works.

Remember: These days you can ask language models (generative AI like ChatGPT, etc) questions about how complex topics like asynchronous programming works. This can be extremely helpful for building that 'internal working model' of how these things actually work at runtime.

:)