Home > Web Front-end > JS Tutorial > body text

Summary of the differences between jumping out of loops in javascript and jquery_jquery

WBOY
Release: 2016-05-16 17:17:43
Original
783 people have browsed it

javascript:

break and continue are two special statements used in inner loops.

Use the break statement to break out of the loop;

Use the continue statement to break out of the current loop and continue with the following values.

Both return false and return true can terminate the loop and jump out of the function; the effect is the same as break.

jquery:

return false is equivalent to break to jump out of the loop

Return true is equivalent to continue jumping out of the current loop and continuing the following loop

javascript stops function execution

return can only be used inside functions

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template