for example: [{date:"", time: [{start:"", end:""},.]},.]; for an array like this, I should judge that date, time.start, time.end is not empty and that it is an empty pop-up window prompt. What I"m doing now is to traverse with two for loops, but it doesn"t feel good enough. Is there a better solution?
for(var i = 0; i < length; iPP){
if(!arr[i].date){
alert("");
return false;
}else{
for(var j = 0; j < arr[i].time.length; jPP){
if(arr[i].time[j].start || arr[i].time[j].end) {
alert("");
return false;
}
}
}
}