I have nested function and i want to return from outer function by firing _.after.
The function that's targeted with _.after doesn't return the most outer
function myFunction(){
var finished = _.after(1, doReturn);
var state = false;
function asynclogic(){
state = true;
finished();
}
function doReturn(){
return state; //<-- make a return for myFunction, not just for doReturn
}
}
EDIT: I want to make a return for a myFunction (outer) using doReturn (inner function) using _.after from underscore