The difference between break exit and rerurn exit

break – exit the body of the while loop , but if there are other statements after the while loop, it will still be executed

return – exit the function , if there are other statements after the while loop, it will be skipped directly and will not be executed

Guess you like

Origin blog.csdn.net/weixin_44981087/article/details/129636086