0

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.

user2948533
  • 1,143
  • 3
  • 13
  • 32

0 Answers0