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:

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
Using Aoi Js To Build A Bot For Discord

Using aoi.js to build a bot on Discord

Explore how the aoi.js library makes it easy to create Discord bots with useful functionalities for frontend applications.

Rahul Padalkar
Apr 17, 2024 â‹… 9 min read
Web Components Adoption Guide: Overview, Examples, And Alternatives

Web Components adoption guide: Overview, examples, and alternatives

Evaluate Web Components, a set of standards that allow you to create custom HTML tags for more reusable, manageable code.

Elijah Asaolu
Apr 16, 2024 â‹… 11 min read
Using Aws Lambda And Aws Cloudfront To Optimize Image Handling

Using AWS Lambda and CloudFront to optimize image handling

Leverage services like AWS Lambda, CloudFront, and S3 to handle images more effectively, optimizing performance and providing a better UX.

Nitish Sharma
Apr 12, 2024 â‹… 12 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