switch(val) { case 1: case 2: case 3: result = "1, 2, or 3";//前三个同样的结果,活用break break; case 4: result = "4 alone"; } case "charactor"://字符串要引号的 break;