switch语句问题
var total = 0,
score = 'B';
switch(score){
case 'A':
total += 30;
break;
case 'B':
total += 20;
case 'C':
total += 10;
break;
default:
total+= 5;
}
A.30
B.25
C.35
D.45
为毛等于30??
var total = 0,
score = 'B';
switch(score){
case 'A':
total += 30;
break;
case 'B':
total += 20;
case 'C':
total += 10;
break;
default:
total+= 5;
}
A.30
B.25
C.35
D.45
为毛等于30??
2016-09-14
举报