If you are new to JavaScript then you must have heard that JavaScript is an asynchronous language but what if I say you are wrong JavaScript is not asynchronous it is a synchronous language, then why is everyone saying it is Async. Let’s read the below article to understand.

What is Synchronous JavaScript?

When you write a piece of code and each code of line executes one after another, then it is a synchronous. Each step of operation waits for the previous step to execute completely. Let’s see an example below to understand this.

Fig 1. A synchronous function to calculate the sum of two number

In the Fig 1, let’s see how the code works…

Ankit Singhania

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store