JavaScript Jabber cover image

001 JSJ Asynchronous Programming

JavaScript Jabber

00:00

Code Readability Issue - The Death Pyramid

Instead of indenting, you know, yeah, for each anonymous function that needs to be called within the other anonymous function, you just set up an event that calls back out to your list of the events that you're in. But if you want to do two things at the same time, the poor man's way to do it is to set a variable as a counter. And then for every function you have, you increment the counter by one, then when all the functions are done, you have them all call the same callback.

Play episode from 13:04
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app