js基础-if-switch选择结构

130 阅读1分钟
        //     alert('恭喜你成绩及格')
        // } else{
        //     alert('你不及格')
        // }
        // var chengjis = parseInt(chengji);
      // if(chengjis>=90){
        //     alert('你的等级为A');
        // } else if(chengjis>=80){
        //     alert('你的等级为B');
        // } else if (chengjis>=60){
        //     alert('你的等级为C');
        // } else {
        //     alert('你的等级为D');
        // }  
        
        
         // var num = 1;
        // switch (num) {
        //     case 1:
        //         alert('我的身上只有1块钱');
        //         break;
        //     case 2:
        //         alert('我的身上只有2块钱');
        //         break;
        //         default:
        //         alert('我的身上没有钱');
        //         break;
        // }