I have a function where in I execute 2 functions. When I view it in the browser, I get 2 loading symbols which i use for showing the loading of data.
I wanted to know if there is a way to execute each function, one after the other, since I can avoid the 2 loading symbols. I don't want to call the second function inside the first function as a solution.
The code is as shown below:
function ABCD() {
function x();
function y();
}
I want function x() to complete its execution and then start with function y()
xhas an asynchronous method call then execution ofywill not wait for the asynchronous method to finishthento chain them sequentially or$.whento wait for them all to finish. Please show the rest of your code to get a better example.