Javascript Return From Asynchronous Programming Vs Multithreading