Skip to content

Latest commit

 

History

History
89 lines (78 loc) · 1.8 KB

2017-8.md

File metadata and controls

89 lines (78 loc) · 1.8 KB

九月学习笔记

9.12

今天学习的技术

  1. 二维数组
  2. if语句
  3. if else
  4. if else if else多重嵌套
  5. switch 语句
  6. for循环
  7. while循环
  8. do while循环

2. 代码

<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>

3. 不懂的内容

已近 问了姐姐了

4. 学习时长

  1. 上午:2小时
  2. 下午:2小时