I am calling method in js like
this.myMethod();
var = true;
The method is defined else where in js file like
myMethod()
{
//calling Apex Method
}
but the issue is the var = true
gets executed before completion of myMethod(). How can i make sure that next line executes only after execution of called method ?