javascript - Does a function wait for a called function to complete before continuing? -


so in below example, if function1 ran wait until function2 finished running before test equals 1? or execute function2 on separate "thread" running function2 , making test equal 1 @ same time? (i think that's it's called, i'm not knowledgeable in whole multithreading thing).

function function1() {     function2();     test = 1; } 

no, wait function2 complete.

there ways multi-threading require work, see here information.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -