I've an function and a conditional in that function and I will create loop by 4 times and break without without thinking any conditional.
Here is my idea
function test (){
var i = 0;
$.ajax({
setup:,
success:function(data){
if(data.resp ==true){
if(i<= 4){
test();
break;
return false;
}
}else{
success;
}
}
})
i++;
}
I know this function will not work but I don't know how to do