当前位置:网站首页>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>");
}
}
边栏推荐
- Xshell和Xftp使用教程
- js中的class类模式及语法 2021.11.10
- Fancy features and cheap prices! What is the true strength of Changan's new SUV?
- 【SemiDrive源码分析】【X9芯片启动流程】32 - DisPlay模块分析 - RTOS侧
- 使用API快捷创建ECS
- 零基础自学SQL课程 | IF函数
- Docker modifies the user name and password of MySQL
- day36 js笔记 ECMA6语法 2021.10.09
- JS基础5
- Redis6 1: what problems can be solved by the introduction of NoSQL and redis?
猜你喜欢

JS foundation 1-js introduction and operator

Docker modifies the user name and password of MySQL

Yann Lecun's new paper: the road to building automatic agents
This Exception was thrown from a job compiled with Burst, which has limited exception support. 报错

还在用 SimpleDateFormat 做时间格式化?小心项目崩掉!

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

Day39 prototype chain and page Fireworks Effect 2021.10.13

js中this的默认指向及如何修改指向 2021.11.09

利用soapUI获取freemarker的ftl文件模板

JS基础1-JS引入与运算符
随机推荐
【sciter】: sciter-fs模块扫描文件API的使用及其注意细节
Xshell和Xftp使用教程
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
ProCAST有限元铸造工艺模拟软件
元宇宙系统的发展与原理介绍
[semidrive source code analysis] [x9 chip startup process] 32 - play module analysis - RTOS side
合约量化系统开发(搭建讲解)丨合约量化系统开发(源码解析及现成案例)
day30 js笔记 BOM和DOM 2021.09.24
js中this的默认指向及如何修改指向 2021.11.09
NFT卡牌链游系统开发dapp搭建技术详情
什么是DAPP系统发展与解析理解
SQL必需掌握的100个重要知识点:检索数据
JS基础3
mysql-. SQL file phishing Online
Download and install mysql5.7 for windows 10
GCC简介
Industry analysis - quick intercom, building intercom
soapui的菜鸟教程
day39 原型鏈及頁面烟花效果 2021.10.13
[sciter]: how sciter uses i18 to realize multi language switching of desktop applications and its advantages and disadvantages