Photo by Kristina Tripkovic on Unsplash

13 Steps to become a JavaScript Pro. Step 8: Asynchronous JavaScript

Vincenzo Bifano

--

Mastering Asynchronous JavaScript: The Vital Step to Becoming a JavaScript Pro — Step 8

JavaScript is a popular programming language used to create dynamic and interactive websites. To become proficient in JavaScript, there are several topics to delve into, which this series aims to cover in a non-exhaustive way as a starting point for learning and improving.

Step 1, The Fundamentals is here
Step 2, Understanding the DOM is here
Step 3, Arrays and Objects is here
Step 4, Functions and Scope is here
Step 5, Events and Event Listeners is here
Step 6, Loops and Iteration is here
Step 7, Regular Expressions is here

Asynchronous JavaScript is a crucial concept to understand when working with modern web applications. It allows us to execute multiple operations simultaneously, without blocking the main thread, leading to a better user experience.

In JavaScript, asynchronous code can be achieved through callbacks, promises, and async/await functions. Here are some of the key concepts to keep in mind:

  1. Callbacks: Callbacks are a common way to handle asynchronous code in JavaScript. They are functions that are passed as arguments to another function, which will then call the callback when the operation is complete.
  2. Promises: Promises provide a more elegant way to handle asynchronous code. They represent a value that may not be available yet and allow us to attach callbacks to it once the value is resolved.
  3. Async/await functions: Async/await is a syntax sugar built on top of promises, providing a more readable and less error-prone way to handle asynchronous code. It allows us to write asynchronous code in a synchronous-like style.

To become proficient in asynchronous JavaScript, it’s important to understand these concepts and when to use them. Here are 3useful links to learn more about Asynchronous JavaScript:

  1. MDN Web Docs — Asynchronous JavaScript: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous
  2. Asynchronous programming in JavaScript: https://eloquentjavascript.net/11_async.html
  3. JavaScript Promises for Beginners: https://www.freecodecamp.org/news/javascript-promises-for-beginners/

And here are 3 books to read to deepen your knowledge of Asynchronous JavaScript:

  1. “JavaScript Patterns” by Stoyan Stefanov: https://www.amazon.com/JavaScript-Patterns-Stoyan-Stefanov/dp/0596806752
  2. “You Don’t Know JS: Async & Performance” by Kyle Simpson: https://www.amazon.com/You-Dont-Know-JS-Performance/dp/1491904224
  3. “Node.js Design Patterns” by Mario Casciaro: https://www.amazon.com/Node

Note: If you make a purchase by clicking on the links I have provided, as an Amazon Associate I earn from qualifying purchases.

Step 9: ES6 and Beyond— coming soon. Follow me to know when it will be online

--

--

Vincenzo Bifano

Husband and father of two rough guys. Grace addicted. Senior Software Architect at Rai Radiotelevisione Italiana. I'm still in beta.