Asynchronous and Synchronous

Hydroid
1 min readMay 8, 2019

--

What is Synchronous and Asynchronous Execution?

JavaScript is synchronous, blocking, single-threaded language. That means that only one operation can be in progress at a time.

Synchronous :

Say we have 2 lines of code. Synchronous means Line-2 can not start running until the Line-1 has finished executing.

The JS Engine reads our code line by line, it uses Single Call Stack to keep track of codes that are supposed to run in their respective order. Like a stack, in a data structure that works in LIFO(Last-In-First-Out) manner.

Originally published at https://techthriver.wordpress.com on May 8, 2019.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Hydroid
Hydroid

Written by Hydroid

Currently working as a Full Stack Developer in India

No responses yet

Write a response