I have the below code:
var isError = false;
$('input, textarea').each(function(index) {
if ($(this).val() === "") {
isError = true;
break;//basically want to break if any one of them is empty and gonna //use this isError value outside
}
});
But I am getting "can't have break outside of loop" error. Thanks in advance.