switch (cnt) {
                    case ("string1"):
                        ...
                        break;
                    case ("string2"):
                       ...
                        break;
                    case ("string3"):
                      ...
                        break;
                    default:
                       ...
                }

case "条件"  一定要用引号

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-10-14
  • 2021-09-17
  • 2021-09-17
  • 2021-09-17
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2021-11-11
  • 2021-09-13
  • 2021-12-04
相关资源
相似解决方案