if… else if… else…文の書き方

[text]<script>
// 条件分岐(if)
var score = 20;
if (score >= 70) {
alert("合格!");
} else if (score >= 30) {
alert("不合格!");
} else {
alert("不合格だしお話になりません!");
}
</script>[/text]

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です