It cannot work like in C# because Javascript environment is a single thread. Thread.Join blocks calling thread but in a browser any block (like loop which...