所以我必須從提示中獲得成績,然後生成一個警告框,用switch語句說明關於成績的一些信息。這是我迄今爲止,但它只是告訴我,回來我給它,如果我在底部開關語句的等級Javascript
var grade = prompt("What grade did you get for the assessment?");
switch(grade) {
case 0: "A" = ("Excellent"); break;
case 1: "B" = "Very Good"; break;
case 2: "C" = "Good"; break;
case 3: "D" = "Pass"; break;
case 4: "E" = "Almost a pass"; break;
case 5: "F" = "Fail"; break;
default : "Please enter a grade from A-F";
}
而你的問題是? – j08691
你的問題是什麼? – Andy
您似乎無法理解switch語句的語法。谷歌它並查找它。 – Xufox