I'm just beginning to learn about asynchronous JavaScript so I'm not sure if this is a silly question, but I could not find an answer to it directly.
In the examples of asynchronous JS I've seen the asynchronous logic is always called after the synchronus logic, that is to say last. Something like:
function1() {}
asynchronousFunction(){}
function2(){}
Isn't this the equivalent of:
function1(){}
function2(){}
function3(){} //asynchronous function
Isn't an asynchronous call the same as a function call at the top of the stack of the main thread, since the asynchronous call is seems to always be made after anything that is synchronous ?
Thanks for any help on this !