I am very new to Java script and need to use callback function in my java script function.I dont know how to use callback function. Below is my code:
function SelectedFeature() {
// Here is my code
call_Method1();
call_Method2();
}
The problem in the above function is that, call_method2() starts executing before call_Method1() ends its execution. To solve this problem, someone told me to use callback function. Now how can i use callback function in my SelectedFeature() function. Please explain by using code sample.