当前位置:网站首页>js label语法跳出多重循环
js label语法跳出多重循环
2020-11-09 23:48:00 【阿豪boy】
https://zhuanlan.zhihu.com/p/32051963
感觉还是不要滥用了.... 这东西最好的归宿是废弃掉...
我也是之前vue那个rfc才了解到js也有这种东西
有c/c++ goto内味了
let i = 0
let j = 0
out: for (i = 0; i < 3; i++) {
console.log("i", i, j)
for (j = 0; j < 3; j++) {
console.log("j", i, j)
if (j === 1) {
// break
break out;
}
}
}
console.log("end")
/*
i 0 0
j 0 0
j 0 1
i 1 1
j 1 0
j 1 1
i 2 1
j 2 0
j 2 1
end
*/
/*
i 0 0
j 0 0
j 0 1
end
*/
版权声明
本文为[阿豪boy]所创,转载请带上原文链接,感谢
https://my.oschina.net/ahaoboy/blog/4710380
边栏推荐
- Baishan cloud technology is selected as the top 100 Internet enterprises in China in 2020
- 必看!RDS 数据库入门一本通(附网盘链接)
- C / C + + Programming Notes: C language development tank war! In memory of our lost little overlord game
- 函数计算进阶-IP查询工具开发
- Error running app:Default Activity not found 解决方法
- Validation failed for one or more entities. See 'entityvalidationerrors' solution
- 当我们开发一个接口时需要注意些什么
- 手把手教你使用容器服务 TKE 集群审计排查问题
- 【CentOS7操作系统安全加固系列】第(2)篇
- CUDA_存储器模型
猜你喜欢
SQL intercepts the data before and after the '.'
手把手教你使用容器服务 TKE 集群审计排查问题
How to implement LRU algorithm
Expect ':' at 0, actual = (JSON conversion exception resolution)
IP地址SSL证书
The solution of type interface * * is not known to the mapperregistry
[best practice] learn how eolinker helps Telecommuting
JT Jingtao project
The movie theater booking system based on micro Service Framework
C + + game development
随机推荐
Important components of Apache Hadoop
Function calculation advanced IP query tool development
win7+vs2015+cuda10.2配置TensorRT7.0
day84:luffy:优惠活动策略&用户认证&购物车商品的勾选/结算
lvgl 库 V7版本相关应用
Problems of input and button (GAP / unequal height / misalignment) and Solutions
Usage of [:] and [::] in Python
CUDA_ constant memory
Application of V7 version of lvgl Library
How much is the cost of CRM system?
Brief analysis of LinkedList source code
How to implement LRU algorithm
The kth smallest node in the print binary search tree of offer
Do you know your server? Do you know what's inside the server
Aikang Guobin denounced Guoxin Securities report as untrue and sent a lawyer's letter
LeetCode 50 Pow(x,n)
Can't find other people's problem to solve
From master of Engineering Physics of Tsinghua University to open source entrepreneur of cloud computing
jt-京淘项目
SSL证书和公网IP地址如何影响SEO