Many believe that Javascript is a single-threaded language, while AJAX is considered asynchronous.
Imagine this scenario;
Let's say there is a button that, when clicked, triggers an AJAX call that takes 5-6 seconds to complete. Despite this, the UI remains unblocked, allowing the user to perform other actions like clicking on another button that, in turn, starts executing some code. In such a situation, when does the AJAX callback function get executed? Does it have to wait for the other code to finish, or can it run in a parallel thread?