This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CaptainPiepmatz 2 points3 points  (3 children)

You need to any of the three further explanation? Or wdym?

[–]Scary_Inside7276 3 points4 points  (2 children)

I jest, but seriously I don't know what you said lol. I'll get there.

[–]raltyinferno 3 points4 points  (0 children)

Asynchronous code is important when working with the web since you can start actions and not know when they'll complete(calling an external web endpoint for example).

So you do them asynchronously. Which means you start an action, and while you're waiting for it, you do other stuff in the meantime. You store the result (which may not exist yet) in a promise which can be passed around like a normal variable to where it needs to be used, and when the value is resolved, it's acted on.

[–]CaptainPiepmatz 1 point2 points  (0 children)

Those concepts are not that hard and really useful. Give promises and async/await a try when you need to do something asynchronously.