DEV Community

Discussion on: All about Promises and async / await

 
ardennl profile image
Arden de Raaij

Cool!! Don't hesitate to blog about your progress, I've yet to make an API in node but I'm sure I will need to do something like that soon.

I totally agree, JavaScript at both the client and server side is pretty damn amazing isn't it.

About the different Promise syntax examples, that is actually a really good question! The difference between the two are not that big, besides that the first one offers a clear way to reject a promise, and the second one does not. If you'd return undefined in showOff, that would probably throw a wrench in the process. Apparently there's another subtle difference but I have yet to understand this: stackoverflow.com/questions/267112... πŸ˜‚

Personally I'm all for consistency. I like the fat arrow function and got used to how they work with this, but if you're not totally comfortable with them yet, a normal function calls is just as good!!

Thread Thread
 
jjjjcccjjf profile image
ο½…ο½Žο½„ο½ο½Ž

Thanks a lot!! 😁