How to terminate this loop or jump out of the loop in jquery? After checking some information and testing, I found that the following method can be used
1. We use continue in the for loop; terminating this loop will be counted as the next loop, and using break to terminate the entire loop.
2. In jquery, $.each uses return true and return false accordingly.
break can jump out of the switch...case statement and continue executing the content after the switch statement. The break statement can also jump out of the loop, that is, end the execution of the loop statement.
The function of the continue statement is to end this loop and then judge whether to execute the loop next time.
The difference between continue and break is: break is to end the loop completely, while continue is to end the current loop.