0
arr1.forEach(function(){
 arr2.forEach(function(){
   if(some condition true){
    return; // this only skips the arr2 functionality
   }
   // rest of the code

 });
});

return only stops functionality. I want it to stop the whole arr2 iteration and continue the arr1 iteration?

UPDATE: (PS: Already know I can get a variable and make it true so the rest of the loop will iterate but wont do anything. )

break and continue gives this error Cannot determine target for 'break/continue '

0 Answers0