I have a JavaScript function func1():
function func1() {
do some stuff;
}
and another JavaScript function func2().
function func2() {
do some other stuff;
}
After completing func1(), how can I call func2()?
I know how to define callback handler for events like onclick,
but I don’t know how to call func2() after func1() has been executed completely.
javascript is not multithreaded so I don’t see what’s the complication here. You should be able to do this: