Like in the standard juery / javascript animation effects. How does javascript know that it doesn't have to wait for a animation to finish before executing the code in the lines beneathe it, because the code gets executed line by line, but how does it know that it doesn't have to properly wait for a function to get a response or it to finish? is this written somewhere in the source code of the those javascript functions or where is this functionality programmed? Same thing goes for the ajax call, how does javascript know that it can do other stuff while it is waiting for a respone?....I really want to understand this in depth...
I've read a lot of articles about asynchronous behaviour / callbacks. I get those points, but I've still not found anywhere on the web, that explains how it is implemented.