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:

Exploring Nushell, A Rust Powered, Cross Platform Shell

Exploring Nushell, a Rust-powered, cross-platform shell

Nushell is a modern, performant, extensible shell built with Rust. Explore its pros, cons, and how to install and get started with it.

Oduah Chigozie
Apr 23, 2024 â‹… 6 min read
Exploring Zed, A Newly Open Source Code Editor Written In Rust

Exploring Zed, an open source code editor written in Rust

The Zed code editor sets itself apart with its lightning-fast performance and cutting-edge collaborative features.

Nefe Emadamerho-Atori
Apr 22, 2024 â‹… 7 min read
Implementing Infinite Scroll In Next Js With Server Actions

Implementing infinite scroll in Next.js with Server Actions

Infinite scrolling in Next.js no longer requires external libraries — Server Actions let us fetch initial data directly on the server.

Rahul Chhodde
Apr 19, 2024 â‹… 10 min read
Integrating Django Templates With React For Dynamic Webpages

Integrating Django templates with React for dynamic webpages

Create a dynamic demo blog site using Django and React to demonstrate Django’s server-side functionalities and React’s interactive UI.

Kayode Adeniyi
Apr 18, 2024 â‹… 7 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