---
# System prepended metadata

title: "\U0001F3C5 Day 09 - if、else if、else 練習一"
tags: [2025 Node.js 後端工程師培訓營]

---

# 🏅 Day 09 - if、else if、else 練習一

### 題目

請看完此篇文章「[if else 陳述式](https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#if...else_%E9%99%B3%E8%BF%B0%E5%BC%8F)」部分，並試著回答下面問題。

問題
---
    
請試著寫出以下情境：

範例： 如果我有 100 元，我就吃壽司，沒有就吃超商。
```javascript=
let myWallet = 200;

if(myWallet >= 100) {
 console.log('我要吃壽司');
} else {
 console.log('我吃超商');
}
```


1. 如果下雨我就坐捷運上班，沒有我就騎車上班
```javascript=
let weather = '雨天';

/* 請試著寫出判斷式 */

```

2. 如果 BMI > 24 就超重，18 ~ 24 體重正常，小於 18 過輕。（提示：補上問號部分)
```javascript=
let myBMI = 19;

/* 請試著寫出判斷式 */

if( ??? ) {
  console.log('過重');
} else if( ??? ) {
  console.log('體重正常');
} else {
  console.log('過輕');
}
 
```



## 回報流程

將答案寫在 CodePen 並複製 CodePen 連結貼至底下回報就算完成了喔! 
解答位置請參考下圖（需打開程式碼的部分觀看）

![](https://i.imgur.com/vftL5i0.png)

<!-- 解答：  

1.
```javascript=
let weather = '雨天';

if(weather === '雨天') {
 console.log('搭捷運上班');
} else {
 console.log('騎車上班');
}
```

2.
```javascript=
let myBMI = 19;

if(myBMI > 24) {
 console.log('過重');
} else if (myBMI <= 24 && myBMI >= 18){
 console.log('體重正常');
} else {
 console.log('過輕');
}
```

-->




回報區
---
| #   | Discord | CodePen / 答案 |
| --- | ----- | ----- |
| 01  | helena  | [CodePen](https://codepen.io/helena27/pen/MYgXmRp) | 
| 02  | Tau  | [CodePen](https://codepen.io/Tau-Hsu/pen/ZYzRKgJ?editors=0012) | 
| 03  | sui_hsilan  | [CodePen](https://codepen.io/suihsilan/pen/mybKweN?editors=0010) | 
| 04  | Xuan | [CodePen](https://codepen.io/YiXuan-Chen-the-vuer/pen/jENKwVm) | 
| 05  | potato_17859 | [CodePen](https://codepen.io/Girl-Lee/pen/mybKwOd?editors=1011) | 
| 06  | 馬德 | [CodePen](https://codepen.io/maywang/pen/KwPeqMm?editors=0010) | 
| 07  | ss585801 | [CodePen](https://codepen.io/ss585801/pen/XJrVJYZ?editors=0011) | 
| 08  | hsiang4100 | [CodePen](https://codepen.io/vvnrbgxl-the-typescripter/pen/OPLEgrW?editors=0010) | 
|09|Nora|[Codepen](https://codepen.io/ehguhcmy-the-reactor/pen/bNbKreL?editors=1111)|
| 10    |    pja._.   | [CodePen](https://codepen.io/PJA0103/pen/zxOadRx?editors=0010) | 
| 11  | adengg | [CodePen](https://codepen.io/Osases/pen/qEWKXya?editors=0012) |
| 12  | CC(tofuuu_cat) | [CodePen](https://codepen.io/CC-cat/pen/EaYRvJK?editors=0012) |
| 13 | janetlai | [Codepen](https://codepen.io/eiddkqxz-the-builder/pen/GgKGMKG?editors=1111)
| 14 | poyi | [CodePen](https://codepen.io/poyi-the-flexboxer/pen/JoPZrjW?editors=0010) |
| 15 | daffytseng | [Codepen](https://codepen.io/Daffy-Tseng/pen/QwLxqEe) |
| 16 | bian_yang_mofa | [CodePen](https://codepen.io/cssf998811/pen/emOKGyB?editors=0011) | 
| 17 | Wayne_957 | [CodePen](https://codepen.io/Wayne957/pen/Wbeyddg) | 
| 18 | Tammy | [CodePen](https://codepen.io/Tammy_Tsai/pen/pvzKaBN) | 
| 19 | JanllyGuo | [CodePen](https://codepen.io/kedugaw/pen/dPbKgXZ?editors=0010) | 
| 20 | wuyuli_21403 | [CodePen](https://codepen.io/Job-Wilhelm/pen/qEWKJvY) | 
| 21 | HarryKuo | [CodePen](https://codepen.io/harry_kuo/pen/ogvyRxe?editors=0011) | 
| 22 | will092317 | [CodePen](https://codepen.io/xuazoblx-the-flexboxer/pen/ogvyRQd) 
| 23 | JC | [CodePen](https://codepen.io/lifetimingwhisper/pen/VYZdJqZ) |
| 24 |Arsian Kuo|[CodePen](https://codepen.io/Arsian-Kuo/pen/RNbBbEq)|
| 25 |  Benson | [CodePen](https://codepen.io/DevilButler/pen/raBrVLx?editors=0010) | 
| 26  | ally_tsao           | [Codepen](https://codepen.io/ggnhmrxv-the-scripter/pen/JoPBGzX?editors=0011)|
| 27. |  地瓜  | [Codepen](https://codepen.io/wiibxzdw-the-bold/pen/QwLBggK?editors=0012)|
|28.|ZoeKang|[CodePen](https://codepen.io/byehywmx-the-animator/pen/MYgBQeg?editors=0011)
|29.|sh|[CodePen](https://codepen.io/shiang29/pen/jENpLVz?editors=0011)
|  30.   |    Lee   | [CodePen](https://codepen.io/leemo-tseng/pen/dPbjjLB?editors=0011) | 
| 31. |  Ali  | [CodePen](https://codepen.io/Alicia1117/pen/raBrQov) |
| 32. |  li-Wei-min  | [CodePen](https://codepen.io/leewayne/pen/emOLOmq) |
| 33. | hsin yu| [CodePen](https://codepen.io/tina2793778/pen/PwYdoxq?editors=0010) |
| 34. | yutzu| [CodePen](https://codepen.io/dtafsrmf-the-lessful/pen/wBwEBNy?editors=0010) |
| 35. | JerryOOO| [CodePen](https://codepen.io/fatiangel/pen/wBwEbwp?editors=0010) |
| 36. | 五五(evelyn_hey2024) | [CodePen](https://codepen.io/EvelynCH/pen/raBPxrw) |
| 37.  | 0111  | [CodePen](https://codepen.io/0111mina/pen/wBwOWEj?editors=0011) | 
|38.|-----這條線以下都麻糬-----|[CodePen](https://codepen.io/tsfaydhk-the-selector/pen/ByBbxNP?editors=0010)
|39.|Rylee|[CodePen](https://codepen.io/ryleezheng/pen/emOoZOB)
|40.|佩妮 |[CodePen](https://codepen.io/bmxbpggh-the-flexboxer/pen/gbYyoNQ?editors=0012)
|41.|chun0075 |[CodePen](https://codepen.io/Lin-Angela/pen/bNbJOdv?editors=0011)
| 42. | Cami | [Codepen](https://codepen.io/irisLife/pen/EaxgroP) |
<!-- 可複製下方格式
|     |       | [CodePen]() | 
-->
