ES6 switch_case 语句 ES6 else_if 语句 ES6 for 循环 ES6 switch_case 语句 var grade = "A"; switch(grade) { case "A": { console.log("Excellent"); break; } case "B": { console.log("Good"); break; } case "C": { console.log("Fair"); break; } case "D": { console.log("Poor"); break; } default: { console.log("Invalid choice"); break; } } ES6 else_if 语句 ES6 for 循环