2020-04-16
3559
#vanilla javascript
Alexander Nnakwue
16959
Apr 16, 2020 â‹… 12 min read

The evolution of asynchronous programming in JavaScript

Alexander Nnakwue Software engineer. React, Node.js, Python, and other developer tools and libraries.

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 min read
View all posts

4 Replies to "The evolution of asynchronous programming in JavaScript"

  1. It’s mostly a good article, but please be rigorous and accurate, or you’ll confuse a lot of people.

    It’s untrue that function A doesn’t run inside function B. It does run, and a console.log() on the first line of A will prove that. Function A creates an anonymous function (the callback) and the body of the anonymous function is what doesn’t run until after B exits.

  2. Fyi the most important callback is the one fed directly into the asynchronous command offered by nodejs or the browser.

    For example, the “someFunction” in fs.readFile(url, someFunction). readFile is an asynchronous function (you’d just have to look it up or play with it to know that). It reads a file, then calls someFunction when it’s done.

    If it didn’t, none of this other stuff would matter. Most of this article is about clever ways to put what you desire into that “someFunction.” Including promises.

Leave a Reply