- 2020-03-26 23:07:22
Break and continue are two special statements for inner loops.
Break out of the loop with the break statement;
Use the continue statement to break out of the current loop and continue with the following values.
Return false and return true both terminate the loop and jump out of the function; Same as the break effect.
Return false is the same thing as breaking out of the loop
Return true is equivalent to contiune jumping out of the current loop to continue the following loop
Return can only be used inside functions