1、选择语句
switch(条件){
case a:
case b:
case c:
case d:
default:
}
2、判断语句
let flag = true;
if(flag){
document.write("这是真的");
}else{
document.write("这是假的")
}
3、JS的循环语句 3.1、while循环
while(循环条件){
}
3.2、for循环
for (let index = 0; index < array.length; index++) {
const element = array[index];
}
标签:语句,index,JS,case,循环,array
From: https://blog.51cto.com/u_15433911/7644434