[Go to site: main page, start]

0% found this document useful (0 votes)
4 views1 page

JavaScript Execution Context Explained

JavaScript is a synchronous and single-threaded language that executes one line of code at a time, with each operation waiting for the previous one to complete. There are two types of code execution: blocking code, which halts program flow, and non-blocking code, which allows execution to continue without waiting. Both types have their advantages and disadvantages.

Uploaded by

bkr77krttd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

JavaScript Execution Context Explained

JavaScript is a synchronous and single-threaded language that executes one line of code at a time, with each operation waiting for the previous one to complete. There are two types of code execution: blocking code, which halts program flow, and non-blocking code, which allows execution to continue without waiting. Both types have their advantages and disadvantages.

Uploaded by

bkr77krttd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

⦿ JavaScript:

➜ JS is a Synchronous and single threaded language.

⦿ Execution Context:

➜ execute one line of code at a time


➜ each operation waits for the last one to complete before executing

⦿ Blocking code V/S Non blocking code (both have it pros & cons)

➜ Blocking code block the flow of program. (Read file synchronous)


➜ Non blocking code does not block execution. (Read file asynchronous)

You might also like