5 تغريدة Nov 04, 2022
Synchronous and Asynchronous JavaScript
Brief Introduction 🧵
Synchronous Javascript:
Synchronous basically means to be in sequence
so you got the idea that in a Synchronous way every statement of the code will execute one by one
If any of the statement is taking 'x' time to execute
the next statement will wait for 'x' time till the previous statement is executed
Asynchronous Javascript:
In Asynchronous Javascript it allows code to execute immediately
without waiting for the previous statement to be executed
It will print the I and Javascript at the moment without waiting for the second statement to finish their execution
and after 2 seconds, the second statement will get executed.
This is how Asynchronous Javascript works.

جاري تحميل الاقتراحات...