当前位置:网站首页>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
边栏推荐
- Important components of Apache Hadoop
- IP地址SSL证书
- DB-Engines 11月数据库排名:PostgreSQL坐稳同期涨幅榜冠军宝座
- 获取List集合对象中某一列属性值
- Algorithm template arrangement (1)
- Brief analysis of LinkedList source code
- Guest interview: Wang Jian
- 代码中的软件工程--对menu项目的源码分析
- Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
- Operation and design of rights management in ERP
猜你喜欢
SSL证书和公网IP地址如何影响SEO
Error running app: default activity not found solution
ERP的权限管理的操作与设计--开源软件诞生24
sql 大小写转换,去掉前后空格
So what should investors do with the current market? Now a new investment outlet is coming!
C + + game development
SRM系统是什么系统?SRM供应商管理系统功能
Make a home page
探访2020 PG技术大会
那么当下的行情投资者该怎么办呢? 现在新的投资风口来了!
随机推荐
Visit 2020 PG Technology Conference
算法模板整理(一)
Unemployment after graduation? How do college students allocate their study time and have a complete computer knowledge system?
获取List集合对象中某一列属性值
From master of Engineering Physics of Tsinghua University to open source entrepreneur of cloud computing
So what should investors do with the current market? Now a new investment outlet is coming!
Must see! RDS database all in one
CUDA_共享内存、访存机制、访问优化
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
Open source project, private tool, rapid development
Can't find other people's problem to solve
Postman(一)---功能介绍
如何高效进行模幂运算
win7+vs2015+cuda10.2配置TensorRT7.0
11.9
JT Jingtao project
价值超10亿美元的直播系统架构图是什么样子的?
Python prompt attributeerror or depreciation warning: This module was degraded solution
November 09, 2020: talk about the similarities and differences between the bulon filter and the cuckoo filter?
ES6, ES7, es8 Learning Guide