当前位置:网站首页>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
边栏推荐
- Day84: Luffy: preferential activity strategy & User Authentication & checking / settlement of shopping cart goods
- PHP - curl copy paste access SMS verification code example
- SRM系统是什么系统?SRM供应商管理系统功能
- ERP的权限管理的操作与设计--开源软件诞生24
- day84:luffy:优惠活动策略&用户认证&购物车商品的勾选/结算
- 2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
- 算法模板整理(一)
- Function calculation advanced IP query tool development
- 没有磁盘空间 No space left on device
- CUDA_ Register and local memory
猜你喜欢

DB engines database ranking in November: PostgreSQL holds the top spot in the same period

Modify the files in the jar package

探访2020 PG技术大会
![Python中[:]与[::]的用法](/img/3b/00bc81122d330c9d59909994e61027.jpg)
Python中[:]与[::]的用法

2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...

Important components of Apache Hadoop

在PHP7下怎么大幅度提升Laravel框架性能?安装Stone!

Just graduated will be confused, I after 7 years of summary, give programmers your 7 suggestions

公网IP地址和SSL证书可以提升SEO吗?

面试官:缓存穿透、缓存雪崩和缓存击穿是什么?
随机推荐
那么当下的行情投资者该怎么办呢? 现在新的投资风口来了!
Operation and design of rights management in ERP
C/C++编程笔记:C语言开发坦克大战!纪念我们逝去的小霸王游戏
11.9
做个别人家的网页
恒讯科技浅谈:出现服务器宕机的处理方式
ES6、ES7、ES8学习指南
DB engines database ranking in November: PostgreSQL holds the top spot in the same period
Common settings of PLSQL developer
Assign the corresponding key and value in the map to the object
Prometheus installation configuration
IP address SSL certificate
Must see! RDS database all in one
C / C + + Programming Notes: C language development tank war! In memory of our lost little overlord game
Modify the files in the jar package
ES6, ES7, es8 Learning Guide
如何k个一组反转链表
ERP的权限管理的操作与设计--开源软件诞生24
函数计算进阶-IP查询工具开发
CUDA_ Shared memory, memory access mechanism, access optimization