---
# System prepended metadata

title: "\U0001F3C5 5/25(三) 每日 JS 刷題任務 - 陣列操作"
tags: [公益程式體驗營 - 2022]

---

---
tags: 公益程式體驗營 - 2022
---

# 🏅 5/25(三) 每日 JS 刷題任務 - 陣列操作



### 題目一：陣列索引
* 陣列索引，點出是第幾筆資料
``` =JavaScript
const numAry = [1,3,4,6,8];

// input 輸入
checkNum(3)
checkNum(9)
checkNum(83)
checkNum(6)

// output 
位置在第2筆
false
false
位置在第4筆
```

### 題目二：陣列相乘
* 將陣列裡面的各個陣列數字相乘

``` =JavaScript
const doubleAry = [
    [1,2,3],
    [3,5,6],
    [2,2,2,2],
];

// input 輸入
callAry(doubleAry)

// output 
"第1個陣列相乘是6，第2個陣列相乘是90，第三個陣列相乘是16"
```

### 題目三：陣列排序
* 正序、反序設計
``` =JavaScript
const a = [1,3,4,6,8];
const b = [3,6,12];
// input 輸入
sortAry("從小到大",[8,3,1,7])
sortAry("從小到大",[99,22,11,33])
sortAry("從大到小",[7,2,33,4])


// output
[1,3,7,8]
[11,22,33,99]
[33,7,4,2]
```



## 回報流程

1. 將答案貼在 Codepen 並複製 Codepen 連結貼至「回報區」回報
（也可以將答案直接貼至「回報區」）

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

<!-- 解答：  -->


回報區
---

<!-- 0. Bingbingboom（回報範例，請使用註解回報）
答案：（可直接撰寫答案）
Codepen：https://codepen.io/Bingbingboom/pen/jOBZVWq
-->

<!-- 1. Bruno Yu
Codepen: https://codepen.io/bruno-yu/pen/eYVRmrW?editors=0011
-->

<!-- 2. Noy
https://codepen.io/MochiCodingPen/pen/rNJGEpZ?editors=1111
-->

<!-- 3. yunyun
https://codepen.io/yun_yunni/pen/dydVBao
-->

<!-- 4. su#7798
codepen: https://codepen.io/wc-su/pen/WNMZVvJ
-->

<!-- 5.IreneLee
codepen:https://codepen.io/ntjtcxpt-the-animator/pen/QWQqeGV?editors=1012 
-->

<!-- 6.Jason Chen
codepen:https://codepen.io/jason60810/pen/Jjprgmb
-->

<!-- 7. yuyu#6310
codepen:https://codepen.io/yuyu0905/pen/dydVxEV?editors=0012
-->

<!-- 8. Chaco#2993
https://codepen.io/chaco-wang/pen/WNMZVYm?editors=1011
-->

<!-- 9. 楓之聲#6945
https://codepen.io/sshane258/pen/YzeEKMg  
-->

<!-- 10. Josh Chen#4552
codepen: https://codepen.io/hiphop825/pen/bGLYGLW?editors=0010
-->

<!-- 11.Aaron803
Codepen : https://codepen.io/narrowd4c/pen/mdXqyJW
-->

<!-- 12.hsiuhsiu
Codepen : https://codepen.io/hsiuhsiu/pen/ExQbxEr?editors=0012
-->

<!-- 13. hw#0715
https://codepen.io/Lhwei/pen/eYVeYxQ 
-->

<!-- 14. Tuhacrt#0008
Codepen: https://codepen.io/Tuhacrt/pen/gOvXbWX?editors=0011
-->

<!-- 15. Cheng-Yu#1813
Codepen: https://codepen.io/ball77111/pen/NWywNgK?editors=0011
-->

<!--16.Vito#7797
https://codepen.io/Vito_Yang/pen/RwQjPwy?editors=0011
-->

<!-- 17. Chi
Codepen: https://codepen.io/YoChi84/pen/OJQOVJa 
-->

<!-- 18. andersonshen#4675
Codepen: https://codepen.io/luxyenni-the-bold/pen/WNMXveB
-->

<!-- 19. Peng
https://codepen.io/peng-027/pen/QWQOwrY
 -->
 
 <!-- 20. KuoMin#4931
Codepen: https://codepen.io/KuoMin/pen/poadJpy
 -->
 
 
  <!-- 21. han#9437
Codepen: https://codepen.io/qnrxylcw-the-reactor/pen/LYQOEay
 -->

<!--   22. Chaoci#2460
Codepen:
https://codepen.io/gmailchao/pen/wvyPMBP?editors=0010
-->

<!--   23. Stanley
Codepen:
https://codepen.io/sean_1215/pen/zYRPrXq?editors=1011
-->


<!--   24. RayChen#6088
Codepen:
https://codepen.io/raychen1996/pen/KKQyKwm
-->

<!--   25. lyle#8123
Codepen:
https://codepen.io/tomys/pen/zYRPBpm?editors=0010
-->

<!--   26. Arista
Codepen:
https://codepen.io/arista-hsieh/pen/XWZzMWQ
-->

<!-- 27. Lina Chen
Codepen: https://codepen.io/LinaChen/pen/mdXqwrb
-->

<!-- 28. bonnieli1414#4906
Codepen: https://codepen.io/bonnieli1414/pen/RwQjLPy?editors=0010
-->

<!-- 29. 小鹿Kerwin#5730
Codepen: https://codepen.io/tkoleo84119/pen/NWywaGm?editors=0012
-->

<!-- 30. SASIMI#5099
Codepen: 
https://codepen.io/sashimi1327/pen/OJQOOMV
-->

<!-- 31. Knn#0492
Codepen: 
https://codepen.io/Knn_84/pen/gOvXjyw
-->

<!-- 32. Xiang#5313
Codepen: 
https://codepen.io/snorlaxxu/pen/xxYPaWw?editors=0010
-->

<!-- 33. Mitour#0672
 codepwn: https://codepen.io/mitour/pen/ZEraVYq-->
 
 <!-- 34. Ryan Lu#3642
Codepen: 
https://codepen.io/ryanlu1125/pen/wvypaYL?editors=0012
-->

<!-- 35.Joyce
https://codepen.io/joycehuang/pen/XWZVeqN?editors=0111
-->

<!-- 36.Joyce
https://codepen.io/charlotte-lee/pen/RwQxxEV?editors=0012
-->

<!-- 37. TaoDoris#5230
https://codepen.io/peetaoting/pen/PoQOGpO?editors=1012
-->

<!-- 38. Murmurline#6969
https://codepen.io/murmurline/pen/ExQodmy
-->

<!-- 39. Pearlie#3536
https://codepen.io/PPcode/pen/bGLaOjL 
-->

<!-- 40. WilliamChou#7375
https://codepen.io/williampo78/pen/KKQQyRN
-->

<!-- 41. 白狐
Codepen：https://codepen.io/baihu7851/pen/GRQGwJE
-->

<!-- 42. bakiii
  https://codepen.io/aki168/pen/QWQOZpe -->
  
<!--  43. 小金#3256
codepen: https://codepen.io/AmoGH357/pen/xxYypQq 
-->

<!-- 44. Claire#2116
codepen：https://codepen.io/claire-chang-the-bashful/pen/YzaEdaO -->

<!-- 45: huch09#1426
codepen: https://codepen.io/subarashii-huch09/pen/mdxqZQq?editors=1112 -->

<!-- 46: Neuf#3083
codepen: https://codepen.io/yifanneuf/pen/NWYQyXM?editors=1111-->