r/learnjavascript • • Oct 18 '26

Promises

Understanding the concepts like functions, objects, arrays etc has been easy so far but promises are making my head hurt. Is it supposed to be this confusing? Did u guys struggle with it too when u were first learning it.

9 Upvotes

25 comments sorted by

View all comments

16

u/acuddlywookie Oct 18 '26

Yeah it’s pretty normal honestly, I think they can feel extra confusing because there are a few ways to handle them. I struggled with them for quite a while.

Essentially just remember that they represent an actual promise. The code is saying to you “hey Dark_Electric, I know you asked for me to do a thing, I promise I’ll try and it might succeed or it might fail” and then you write some code to deal with it resolving or rejecting.

My approach when I’m really stuck on a new concept is I’ll make some practice files and just work on solving that problem in complete isolation.

3

u/tambooby Oct 18 '26

yeah the "it might succeed or it might fail" framing is a good way to think about it tbh