Learning resources 📚 for understanding Javascript async nature 🔮
Tags: javascript, beginners, webdev
Published: 2020-10-14 19:19:50

Over my mentoring practice, I often see the stage of learning, when an aspiring developer starts tackling the asynchronous nature of the Javascript.

And over the last year, I've built a small, though an unbelievably helpful collection of resources for learning the asynchrony concepts and the concurrency model in JS well enough. 

It should be enough to let you work with asynchronous javascript in your day job (and demonstrate the knowledge in tech interviews before that).

&nbsp;

Specifically, this collection can be helpful in learning: 

- Promises, callbacks
- Event Loop model and queues 
- async/await operators

These are not obvious as they might seem and sometimes may be difficult to crack.

## Learning resources

1. 🔮 ["Async & Performance" book](https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async%20&%20performance/README.md#you-dont-know-js-async--performance) from You Don't Know JS series by Kyle Simpson (aka. getify). Specifically, take a look at chapters 1,2, and 3.

    ❗🏋  The book is relatively harder than other recommended resources, but it covers the whole theory behind asynchronous concepts in Javascript.

    If you are a junior javascript developer going through interviews, you should explore it, despite the difficulties - with that, you'll ace any async related questions on the interview and will impress the interviewing team.

    &nbsp;

2. 🤞 ["Javascript Promises: an introduction" by Jake Archibald](https://web.dev/promises/) -  great explanation of Promises, friendly and not shallow at the same time. 

    There are many useful examples (but they take time to understand fully, sometimes) - and I recommend you to play around with them in a Codesandox so you really feel comfortable with them. 

    By the way, the article author - Jake - posts quite friendly and interesting articles in general, so you might want to check out those later as well.

    &nbsp;

3. ➰ Talk ["What the heck is the event loop anyway?" by Philip Roberts](https://www.youtube.com/watch?v=8aGhZQkoFbQ) - one of the best talks about Event Loop model which is what is the foundation of the concurrency in JS. It's a must-watch. The talk is both fun and enlightening.

4. ➿ Talk ["In The Loop - JSConf.Asia" by Jake Archibald](https://www.youtube.com/watch?v=cCOL7MC4Pl0) (the author of promises introduction at the top) - it's related to the Philip Roberts talk, and is a great follow-up. 

    On top of that, it covers aspects of the Event loop that are important to the actual understanding of Promises (which Philip Roberts didn't cover).

    &nbsp;

5. 🦄 ["JavaScript Visualized: Promises & Async/Await" by  Lydia Hallie](https://dev.to/lydiahallie/javascript-visualized-promises-async-await-5gke) - this article should help you solidify the learnings so far.

    The visualizations there are especially helpful to keep your knowledge in the long-term. Those visual images not just ease the learning but also reinforce your memories in the brain, so you are less likely to forget.

    And it also covers `async / await` concept - synchronous like syntax to write Promises-based code in a more straightforward way. `Async / await` are essential tools for writing readable and maintainable logic based on Promises in modern projects. 

    &nbsp;

## In what order to learn using this collection?

In the beginning, try to use the default order - as they go in the list above.

**But** if you find yourself struggling with the 1st item - as I said, it's relatively harder than other recommendations - use the alternative order:
- Start with the article series by Lydia Hallie:  5 
- Go through the 2nd to 4th items: 2, 3, 4
- After that come back to the 1st to deepen your knowledge and help yourself to ace the tech interviews 😉: 1

Why I don't use the alternative order as the default in my mentoring practice? It's easy: to challenge the mentee. 

The book "Async & Performance" really makes you go through the complex concepts that stay in the basement of JS asynchrony. If you can handle those - there will be fewer subjects in JS that will be able to make you break a sweat, that's for sure 🙂

And so that's all, my friend. Hope these resources will help you on your Javascript learning path!

## What's next?

If you like these resources, you might also be interested in [BandaWorks](https://twitter.com/bandaworks) twitter community.

Every day we post valuable content for junior developers there, among those: 

- Daily advice to help you become a stronger developer
- Learning resources for web development
- Overview and our own thoughts on the development articles by other authors

{% twitter 1313829364103077890 %}

[Join us](https://twitter.com/bandaworks) if you are the same as we - focused on continuous improvement! 😉