Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

78. forEach 跳出循环与终止循环 #78

Open
wqjiao opened this issue Aug 26, 2022 · 1 comment
Open

78. forEach 跳出循环与终止循环 #78

wqjiao opened this issue Aug 26, 2022 · 1 comment

Comments

@wqjiao
Copy link
Owner

wqjiao commented Aug 26, 2022

在 forEach 中使用 return 语句跳出本次循环,进入下次循环,并不能直接终止循环;
在 for 循环中可以使用 return 语句终止循环

@zhuyuyi
Copy link

zhuyuyi commented Aug 26, 2022

你教过我,try catch 中用 throw 终止循环

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants