<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title>switch练习1</title>
<script type="text/javascript">
var score = 75;
switch(true){
case score >= 60 && score <=100:
console.log("合格");
break;
case score < 60 && score >=0:
console.log("不合格");
break;
default:
console.log("不合法");
break;
}
</script>
</head><body>
</body>
</html>
网友评论