当前位置:网站首页>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
边栏推荐
- Validation failed for one or more entities. See ‘EntityValidationErrors’解决方法
- JT Jingtao project
- Make a home page
- Can public IP address and SSL certificate improve SEO?
- Brief analysis of LinkedList source code
- Important components of Apache Hadoop
- What can CRM system help enterprises do?
- The movie theater booking system based on micro Service Framework
- Python提示AttributeError 或者DeprecationWarning: This module was deprecated解决方法
- ERP的权限管理的操作与设计--开源软件诞生24
猜你喜欢
Guest interview: Wang Jian
ES6、ES7、ES8学习指南
The movie theater booking system based on micro Service Framework
asp.net Using serilog in core and customizing enrich
PHP - curl copy paste access SMS verification code example
What is the architecture of a live broadcast system worth more than $1 billion?
Win7 + vs2015 + cuda10.2 configuration tensorrt7.0
How much is the cost of CRM system?
LinkedList源码简析
Operation and design of rights management in ERP
随机推荐
探访2020 PG技术大会
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
C/C++编程笔记:C语言开发坦克大战!纪念我们逝去的小霸王游戏
Postman (1) -- function introduction
如何实现LRU算法
[best practice] learn how eolinker helps Telecommuting
如何k个一组反转链表
Common concepts and points for attention of CUDA
Error running app: default activity not found solution
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
没有磁盘空间 No space left on device
2020-11-09:谈谈布隆过滤器和布谷鸟过滤器的相同点和不同点?
November 09, 2020: talk about the similarities and differences between the bulon filter and the cuckoo filter?
Daily page number style problems
Hengxun Technology: the way to deal with server downtime
Prometheus安装配置
The solution of type interface * * is not known to the mapperregistry
SQL server attached database access denial resolution summary
害怕重构?都怪我太晚和你介绍该如何重构,现在我来了
Brief analysis of LinkedList source code