当前位置:网站首页>Day23 JS notes 2021.09.14
Day23 JS notes 2021.09.14
2022-06-28 11:30:00 【Little dream of becoming a big man】
while Loop structure
while( Conditional statements ){
Conditional execution code
}
do while Loop structure
do while Cycle is while Circulating variants . The cycle flow is similar , The only difference is do while The loop executes once first , Whether or not the conditions are valid , Do it first , The following process and while The cycle is the same .
for Loop structure
for( Declare variables and assign initial values ; Conditional expression ; The change law of the variable after each repetition ){
Repeated code block
}
# Declare variables and assign initial values in the syntax , Is where to start repeating ; Conditional expressions can limit when repetition stops ( When conditions don't hold ); You can know how many times to repeat by repeating the change of the variable and the conditional expression each time
Jump keyword in loop
continue keyword , You can skip the current cycle , Go straight to the next cycle .
break keyword , Can terminate the cycle , Let the whole cycle run directly .
Nesting of loops
for(var i=1;i<=5;i++){
for(var j=1;j<=5;j++){
document.write(" The first " + i + " Individual runner " + j + " circle <br>");
}
}
边栏推荐
- js中的class类模式及语法 2021.11.10
- 随机森林以及 AMR 训练出的诗词制造器
- Introduction to GDB
- Lihongyi, machine learning 7 Conclusion
- Setinterval, setTimeout and requestanimationframe
- 功能真花哨,价格真便宜!长安全新SUV真实力到底怎样?
- JS foundation 1-js introduction and operator
- day39 原型链及页面烟花效果 2021.10.13
- day33 js笔记 事件(下)2021.09.28
- MySQL cannot query the maximum value using the max function
猜你喜欢

Class pattern and syntax in JS 2021.11.10

Jetpack Compose Desktop 桌面版本的打包和发布应用

day32 js笔记 事件(上)2021.09.27

Web page tips this site is unsafe solution

行业分析| 快对讲,楼宇对讲

一套十万级TPS的IM综合消息系统的架构实践与思考

day36 js笔记 ECMA6语法 2021.10.09

Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community

《运营之光3.0》全新上市——跨越时代,自我颠覆的诚意之作!

阿里三面:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别
随机推荐
[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)
MySQL cannot query the maximum value using the max function
工作组环境下的内网渗透:一些基础打法
李宏毅《机器学习》丨7. Conclusion(总结)
《运营之光3.0》全新上市——跨越时代,自我颠覆的诚意之作!
vsftpd服务的部署及优化
day28 严格模式、字符串 js 2021.09.22
【实战】1364- 实现一个完美的移动端瀑布流组件(附源码)
Characteristics of solar wireless LED display
Industry analysis - quick intercom, building intercom
[sword finger offer] 49 Ugly number
将浏览器中的文件 url转换为File流
还在用 SimpleDateFormat 做时间格式化?小心项目崩掉!
File的io流与base64
Mysql安装配置以及解决重装Mysql时忘记root password问题
静态库的制作和使用
买股票在中金证券经理的开户二维码上开户安全吗?求大神赐教
方法重写(Override)
基于验证码识别的机器学习项目captcha_trainer操作实践
AGCO AI frontier promotion (6.28)