- 二维数组
- if语句
- if else
- if else if else多重嵌套
- switch 语句
- for循环
- while循环
- do while循环
<script type="text/javascript">
var mynum =6;
do
{
document.write("数字:"+mynum+"<br/>");
mynum=mynum-1;
}
while( num>=6)
</script>
<script type="text/JavaScript">
var mymoney,sum=0;
for(mymoney=1; mymoney<=10; mymoney++)
{
sum= sum + mymoney;
}
document.write("sum合计:"+sum);
</script>
<script >
var aa= new Array(34,45,56,46,68);
document.write(aa.length);
</script>
<script type="text/JavaScript">
var myweek =3;//myweek表示星期几变量
switch(myweek)
{
case 1:
case 2:
document.write("学习理念知识");
break;
case 3:
case 4:
document.write("到企业实践");
break;
case 5:
document.write("总结经验");
break;
default:
document.write("周六、日休息和娱乐");
}
</script>
<script type="text/javascript">
var mynum =0;
while(mynum<=6)
{
document.write("数字:"+mynum+"<br/>");
mynum=mynum+1;
}
</script>
<script type="text/javascript">
var aa= new Array();
for(var i=0;i<2;i++){
aa[i]=new Array();
for(var j=0;j<3;j++){
aa[i][j]=i+j;
}
}
aa[0][1]=5;
</script>
已近 问了姐姐了
- 上午:2小时
- 下午:2小时