当前位置:网站首页>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>");
}
}
边栏推荐
- 人人都可以参与开源!龙蜥社区最不容错过的开发者活动来了
- day24 js笔记 2021.09.15
- 100 important knowledge points that SQL must master: retrieving data
- SQL中的DQL、DML、DDL和DCL是怎么区分和定义的
- Introduction to GDB
- 拼接String集合中的字符串_基于Stream
- 数据库系列:有什么办法对数据库的业务表进行无缝升级
- JS foundation 4
- MySql5.7添加新用户
- Fancy features and cheap prices! What is the true strength of Changan's new SUV?
猜你喜欢

day39 原型鏈及頁面烟花效果 2021.10.13

JS基础3

JS基础8

Day39 prototype chain and page fireworks effect 2021.10.13

科研丨Web of Science检索技巧

day32 js笔记 事件(上)2021.09.27

如临现场的视觉感染力,NBA决赛直播还能这样看?

Oracle 日期格式化异常:无效数字

Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system

day33 js笔记 事件(下)2021.09.28
随机推荐
Graduation season, some suggestions for you who are new to the society
Jetpack Compose Desktop 桌面版本的打包和发布应用
Graduated
Day39 prototype chain and page Fireworks Effect 2021.10.13
Machine learning project captcha based on verification code recognition_ Trainer operation practice
AGCO AI frontier promotion (6.28)
MySQL installation configuration and solving the problem of forgetting root password when reinstalling MySQL
Oracle 日期格式化异常:无效数字
Secretary of the Ukrainian national security and National Defense Commission: will carry out precision strikes against targets in Russia
工作组环境下的内网渗透:一些基础打法
GCC简介
获取系统当前日期
【实战】1364- 实现一个完美的移动端瀑布流组件(附源码)
JS foundation 3
使用 Calendar 计算时间
拼接String集合中的字符串_基于Stream
Making and using of static library
MySql5.7添加新用户
Get current system date
Scientific research - web of science retrieval skills