--- tags: Vue 直播班 - 2022 春季班 --- # 🏅 Day 9 ###### tags: `Vue 直播班 - 2022 春季班` 請同學先閱讀完 「[JavaScript 表達式觀念及運用 - JS Expression](https://wcc723.github.io/development/2020/09/17/js-expression/)」 這篇文章後再作答。 題目 (直接貼上答案) --- #### 問題一 (判斷何者為表達式): ```js= if(Ans) { console.log("Ans 是表達式"); } ``` 請問以下有哪些選項代入 Ans 可以輸出 console.log 不會報錯? 補充: [真值假值觀念](https://developer.mozilla.org/zh-CN/docs/Glossary/Truthy) ``` 1. 2 === 2 2. "string" 3. var a 4. if(true){let a = 2;} 5. [25, 30] // 純陣列 6. {name: "hexSchool"} // 純物件 ``` #### 問題二(表達式的應用): ```js= function hexIsGood() { return true; } ``` 以上程式碼為一個「表達式」,請大家到 [MDN](https://developer.mozilla.org/en-US/) 或是透過 Google 搜尋,尋找有哪些程式運作可以插入以上的表達式,仍能正確運行。 舉例 (if 判斷式): ```js= function hexIsGood() { return true; } if(hexIsGood()) {console.log("此程式碼可以運作")}; ``` Bootstrap 格線系統 - 常見錯誤 --- 在運用格線系統 `.row` 時,外層需使用 `.container` 、 `.container-*`,避免產生 x 軸 請將此 [Codepen](https://codepen.io/Bingbingboom/pen/yLodLqP?editors=1010) 補上 `.container-*`,並觀察其差異 回報流程 --- 請同學依照下圖教學觀看解答、回報答案:  回報格式如下圖,請在「回報區」使用註解回報答案 (為了統計人數,請同學依序加上「報數」)  <!-- 解答一 1, 2, 5, 6 因為它們都是表達式,會回傳結果。 --> <!-- 解答二 // Ex1: 可以帶入三元運算子 function hexIsGood() { return true; } console.log(hexIsGood() ? '很棒棒' : '不棒棒'); // Ex2: 可以代入樣板字面值 function hexIsGood() { return true; } let str = `六角學院很讚: ${ hexIsGood() }`; console.log(str); --> <!-- - Bootstrap - 將 ... 改為 .container、.container-fluid、.container-sm .. 都可以 --> 回報區 --- | 報數 |組別/名字 | codepen / 其他回饋 | |:--------:| -------- | -------- | |1|CloThEs | https://codepen.io/bogwdnxx-the-sans/pen/XWeYBEr| |2| Iris Huang | https://codepen.io/ythuang/pen/jOGKpZQ | |3| Larry | https://codepen.io/larrylinr5/pen/jOGKpzQ | |4| 肉鬆 | https://codepen.io/klrkicog/pen/rNGKrKB?editors=1011 | |5|Evan Chiang| https://codepen.io/piskesocute/pen/mdBKjLB | |6| Yunei | https://codepen.io/Yunei/pen/JjrZBqb | |7|群嘉|https://codepen.io/efzdamnp-the-lessful/pen/qBPKyyN?editors=0000| |8| POPEYE | https://codepen.io/popeye_ux/pen/KKXeBGE | |9| Liu | https://codepen.io/feng-chi-liu/pen/qBPKMMo?editors=1111 | |10| Karen Huang | https://codepen.io/Coding_Snorlax/pen/vYeraRm?editors=1012 | |11| Gill | https://codepen.io/Gill-Chin/pen/WNZygYv?editors=1010 | |12| Jhen | https://codepen.io/cheng-jhen/pen/WNZybJQ?editors=1111 | |13|Wenfish|https://codepen.io/wenfisht/pen/YzrvOpa| |14|Terry21|https://codepen.io/feng0409/pen/MWEXPwo?editors=1012 | |15|Elaine Liu|https://codepen.io/elaine7598/pen/ExwRewm?editors=1010| |16| Sheep | https://codepen.io/SheepNDW/pen/dyVKjjN | |17|Empty Wu|https://codepen.io/emptywu/pen/dyVKgQb | |18|Gui|https://codepen.io/guitimliu/pen/poWKxqa |19|Charlotte Lee|https://codepen.io/charlotte-lee/pen/jOGKvQW?editors=1010 | |20|Himi|https://codepen.io/Himi/pen/OJxEBER| |21|威爾|https://codepen.io/WILL_Wu/pen/NWazOov| |22|陳暐中|https://codepen.io/wei-z/pen/VwMdqKy?editors=1011| |23|hua|https://codepen.io/hahahazzz123/pen/wvrXRZv| |24|andersonshen| https://codepen.io/luxyenni-the-bold/pen/QWqxZEG | |25|Judy ☻| https://codepen.io/hsiaohan/pen/bGoKzEE?editors=1100 | |26|Henry Wu| https://codepen.io/dkcmlaww-the-flexboxer/pen/LYzrqbM | |27|AKI|https://codepen.io/akichen27/pen/KKXeJgW | |28|Tim Lin|https://codepen.io/TimmyLin/pen/xxXzBbo| |29| 黃士桓 | https://codepen.io/shr-huan-huang/pen/VwMdRzK?editors=1010 | |30|有廖先生(rain)|https://codepen.io/billpop741/pen/vYervqb| |31| Steven Chan |https://codepen.io/Steven1220/pen/WNZyPRo?editors=1111 | |32|Aaron Tu|https://codepen.io/aarontu/pen/rNGKbyL| |33|Mylène|https://codepen.io/hamajibashi/pen/QWqxoZJ| |34|kevinhes|https://codepen.io/kevinhes/pen/qBPKzrd?editors=1010| |35|shio|https://codepen.io/shioyen/pen/eYGKwKw?editors=1010| |36|Benson|https://codepen.io/soul81624/pen/QWqxXJJ | |37|John Lu| https://codepen.io/jiangshuuu/pen/NWaXXWb?editors=1011 | |38|Rick Tzeng|https://codepen.io/rick917jp6/pen/QWqxXdr |39|咖咖| https://codepen.io/gon790219/pen/BawVXNq | |40|Bonnie| https://codepen.io/bonnieli1414/pen/abLKgPd?editors=1011 | |41|Yummyniya| https://codepen.io/yummyniya/pen/PoJBoPp | |42| tingyu | https://codepen.io/dgltu/pen/eYGjYxO?editors=0011 | |43| 柴貓 | https://codepen.io/shibacat/pen/rNGraRm | |44|Calon|https://codepen.io/Calon0118/pen/jOGpPGB| |45|Laura|https://codepen.io/minminn/pen/abLjBBG| |46|Howard|https://codepen.io/yawdnhbm/pen/gOGKdqJ| |47|Steve|https://codepen.io/ycsteve/pen/jOGpVga?editors=1011| |48|Jerry|https://codepen.io/rteyfwwd-the-scripter/pen/QWqBgBV| |49|AllenW|https://codepen.io/AllenW/pen/jOGpwqZ| |50|我是泇吟|https://codepen.io/kljuqbxs/pen/VwMBMXO| |51|peter.chen1024|https://codepen.io/JIAN-RONG/pen/ExwpbYG?editors=1011| |52|Vicky|https://codepen.io/hyxfish27/pen/abLjoQP | |53|Erin Huang|https://codepen.io/ErinHuang/pen/zYEJdNG | |54|Otis|https://codepen.io/humming74/pen/BawOmRp?editors=1010 | |55|Scottie|https://codepen.io/wow767t/pen/PoJdEje?editors=1010| | 56 | Sihle Huang | https://codepen.io/bugbug777/pen/vYezjRW | |57|dOvOb|https://codepen.io/gezzgrwj-the-styleful/pen/NWaLMwE?editors=1000 |57|許敏鑫|https://codepen.io/MIN-HSIN/pen/RwLJmQw |58|Jasper|https://codepen.io/li-jasper/pen/qBPJjOQ | |59|Jess_Wu|https://codepen.io/jess1104/pen/oNGaJwx | |60|Dobe|https://codepen.io/lisebee/pen/aa627b845d83555efcb99ae9392bff60?editors=1011| |61|阿武|https://codepen.io/samwnkyat/pen/QWqJbPj |63|YC|https://codepen.io/YCLu/pen/zYEMBdj | |64|Henry|https://codepen.io/kaohenry9287/pen/YzrRpaL | |65|DDDDK|https://codepen.io/dkklee/pen/xxXQgdJ | |66|Hedy|https://codepen.io/hhhsuan41/pen/LYzXrYb | |67|ShaoYu|https://codepen.io/shaoyukao/pen/poWqJzG| |68|William_O^2|https://codepen.io/CodingTrain_1/pen/PoJXZJp| |69|Anna|https://codepen.io/kycrleao/pen/LYzMxWr?editors=1000| |70|FuChang|https://codepen.io/fuchang830714/pen/GRMXoEx| |71|Jason Chen|https://codepen.io/jason60810/pen/BawMLKK | |72|mei|https://codepen.io/Shila-Chen/pen/gOGZVzw | |73|Abbie|https://codepen.io/Abbie0704/pen/RwLdBve| |74|安志|https://codepen.io/lwmtsgek/pen/eYGowmo?editors=1111| |75|Riley|https://codepen.io/jjpxbprd/pen/GRMadea| |76|肉桂卷|https://codepen.io/ginnlee/pen/BawejMy?editors=1011 | |77|Jerry Yen|https://codepen.io/JerryYen/pen/jOGgmMW | |78|阿劍| https://codepen.io/seonkuraito/pen/PoJVNgd | |79|2/WA| https://codepen.io/ldddl/pen/BamaogW | |80|andyii| https://codepen.io/gultrotpybyvue/pen/QWOwapq |81|Carol Li|https://codepen.io/carolli834/pen/RwjNNJo?editors=1011 | |82|JD孟璁|https://codepen.io/oikdkmxq-the-looper/pen/yLPYVdd?editors=1010 | |83|Van|https://codepen.io/fbacojji-the-selector/pen/oNoyQLo?editors=1010 | |84|大衛|https://codepen.io/exnsrpjc/pen/ExoPdxa?editors=1011 |
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up