---
title: 选择语句
date: 2024-06-06T23:51:41Z
tags: []
---

1. if

   ```javascript
   if ()
   {}
   else if()
   {}
   else
   {}
   ```

2. 三元运算

   ```javascript
   条件 ? true : false;
   ```

3. switch

   ```javascript
   switch (data) {
     case value1:
       code1;
       break;
     case value2:
       code2;
       break;
     default:
       coden;
       break;
   }
   ```

4. goto

   ```c
   跳转标签
   goto 标签；
   ```

‍

‍
