2009-07-15 caseには式 Javascript 久しぶりに更新してみるよ。 var k = 3; switch (k) { case 1 + 2 : alert("caseに式が使えるよ!"); break; } ifと変わらん。