I have for eg code like this
function check(parameters){ some code; $.post('/url', function(data) { //and here I want if data==0 return false from function check //if no go and skip to instruction 1 }); instruction 1; } I want in my program later to use if(check(params)==0) but it doesn't seems to working. How i can do this in java script? I need to do if($.post...==0)? Best regards