To understand javascript you have to understand its single threaded nature. Imagin a chef in tiny kitchen with only single burner, that burner is the javascript engine and how the chef manage burner heat which determins either restaurant runs smoothly or ends up in a shouting match. Content List What synchronous code means What Asynchronous Code Means Why JavaScript Needs Asynchronous Behavior Examples: Timers and API Calls Problems with Blocking Code What synchronous code means Synchronous or sync is the default behaviour of the javascript, its a top to bottom, line by line execution of the code, in that each operaiton must be finish before next one starts. Call Stack: a stack data structured by the js we called it call stack, it used to keep track what happening. When operation execution start it pushed into the call stack and after finishing it pop out from it. Sequential Nature: if line 2 takes 10 seconds to finish the line 3 not run until those 10 seconds are up.…