DEV Community

[Comment from a deleted post]
 
ycmjason profile image
YCM Jason

I have added some changes. Tell me if it looks good? :D

 
viki53 profile image
Corentin H. ⚡ • Edited

It's great! But you haven't really updated the code everywhere, so maybe you should explain why you made it this way (or simplify the rest of the code), because this behavior might not be obvious for those who don't (yet) master the art of Promise ;)

 
ycmjason profile image
YCM Jason

Have I not changed the code? I thought I changed it all?

I added some explanation on how you can resolve a promise in catch.

 
viki53 profile image
Corentin H. ⚡

I still see a lot of return new Promise() code along the first half of the article. But I guess it makes sens if you explain it later.

I just hope people won't copy & paste without reading a bit further to get the short version. :)

 
ycmjason profile image
YCM Jason

Haha, I see what you mean.

But I guess I wouldn't worry so much about it. I think my aim is for people to understand. So I will leave it this way, it is probably easier to understand.