DEV Community

Discussion on: Explain async like I'm five

Collapse
 
itsjzt profile image
Saurabh Sharma • Edited

for knowing Async you need to know one problem that exists while using computers or may I say programming computers.

The Processors are the fastest thing in the whole computer next to them are Cache and then RAM and then secondary storage. Tasks using secondary storage, calling to another server over the internet, doing something in the database are slow and they are collectively called I/O tasks.

I/O tasks are slow because calling to the server requires a lot of waiting time, storage devices are slow too. BUT JavaScript waits for nobody. That's why ASync Await was made. It's basically like saying "hey JavaScript this function will do some I/O tasks, so wait for the tasks that say you await.

If you understood that then great, see this video for digging more deep youtube.com/watch?v=9YkUCxvaLEk

Huh! my first ELI5 explanation. •ᴗ•