자바스크립트 switch 문 문법

By | 11월 3, 2011


switch(n)
{

   case 1:

     execute code1
     break;

   case 2:

     execute code2
     break;

   default:

     code to be executed if n is different from case 1 and 2

}

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments