---
tags: 公益程式體驗營 - 2022
---
# 🏅 5/26(四) 每日 JS 刷題任務 - 混合題目
### 題目一:陣列與物件排序
* 依照物件中每個人的分數大小做排序
``` =JavaScript
const scoreAry = [
{
name:"葉子",
score:99
},
{
name:"洧杰",
score:60
},
{
name:"卡斯伯",
score:80
}
];
// input 輸入
callAry("正序",scoreAry)
callAry("反序",scoreAry)
// output
// 第一筆
[
{
name:"洧杰",
score:60
},
{
name:"卡斯伯",
score:80
},
{
name:"葉子",
score:99
}
]
// 第二筆
[
{
name:"葉子",
score:99
},
{
name:"卡斯伯",
score:80
},
{
name:"洧杰",
score:60
},
]
```
### 題目二:篩選資料
* 請篩選出第一個參數,並比對 `scoreAry2` 看有誰達到條件
``` =JavaScript
const scoreAry2 = [
{
name:"葉子",
score:99
},
{
name:"洧杰",
score:60
},
{
name:"卡斯伯",
score:80
}
];
// input 輸入
callAry2(80)
callAry2(99)
callAry2(100)
// output
葉子卡斯伯分數有在80分以上
葉子分數有在99分以上
沒有人分數在100分以上
```
### 題目三:選出從零到指定數字範圍裡面的質數
``` =JavaScript
// input 輸入
prime(13)
prime(30)
prime(24)
prime(44)
// output 請以字串來顯示
"2,3,5,7,11"
"2,3,5,7,11,13,17,19,23,29"
"2,3,5,7,11,13,17,19,23"
"2,3,5,7,11,13,17,19,23,29,31,37,41,43"
```
## 回報流程
1. 將答案貼在 Codepen 並複製 Codepen 連結貼至「回報區」回報
(也可以將答案直接貼至「回報區」)

<!-- 解答: -->
回報區
---
<!-- 0. Bingbingboom(回報範例,請使用註解回報)
答案:(可直接撰寫答案)
Codepen:https://codepen.io/Bingbingboom/pen/jOBZVWq
-->
<!-- 1. Bruno Yu
Codepen:https://codepen.io/bruno-yu/pen/poawJKL?editors=0011
-->
<!-- 2. yunyun
Codepen:https://codepen.io/yun_yunni/pen/mdXqGdr
-->
<!-- 3.IreneLee
codepen:https://codepen.io/ntjtcxpt-the-animator/pen/RwQjYNR?editors=0012
-->
<!-- 4. su#7798
codepen: https://codepen.io/wc-su/pen/rNJYZJX
-->
<!-- 5. 楓之聲#6945
codepen:https://codepen.io/sshane258/pen/QWQOZJj
-->
<!-- 6. Aaron
codepen: https://codepen.io/narrowd4c/pen/mdXqyJW
-->
<!-- 7. Xiang#5313
codepen: https://codepen.io/snorlaxxu/pen/eYVeQEV?editors=0010
-->
<!-- 8.Chaco#2993
https://codepen.io/chaco-wang/pen/qBxVQBy?editors=0011
-->
<!-- 9.Noy
https://codepen.io/MochiCodingPen/pen/xxYPyBY
-->
<!-- 10. Josh Chen#4552
codepen: https://codepen.io/hiphop825/pen/dydZwmO?editors=0010
-->
<!-- 11. SASIMI#5099
codepen:
https://codepen.io/sashimi1327/pen/RwQjvGy
-->
<!-- 12. Cheng-Yu#1813
codepen:
https://codepen.io/ball77111/pen/ZErawjB?editors=0011
-->
<!--13.Vito#7797
https://codepen.io/Vito_Yang/pen/OJQOqWV?editors=0012
-->
<!--14.lyle#8123
https://codepen.io/tomys/pen/XWZzwOg?editors=0011
-->
<!-- 15. Chi
Codepen: https://codepen.io/YoChi84/pen/XWZzvKG
-->
<!-- 16. Jason Chen
Codepen: https://codepen.io/jason60810/pen/wvyPLpW
-->
<!-- 17: Tuhacrt#0008
Codepen: https://codepen.io/Tuhacrt/pen/eYVeQWV?editors=0011
-->
<!-- 18. Chaoci#2460
Codepen:
https://codepen.io/gmailchao/pen/yLvpLbX?editors=0010
-->
<!-- 19. hw#0715
https://codepen.io/Lhwei/pen/poadMWQ
-->
<!-- 20. 小鹿Kerwin#5730
https://codepen.io/tkoleo84119/pen/gOvoaBP?editors=0012
-->
<!-- 21. Knn#0492
https://codepen.io/Knn_84/pen/abqEwmY?editors=0010
-->
<!-- 22. yuyu#6310
https://codepen.io/yuyu0905/pen/PoQEJbB?editors=0012
-->
<!-- 23.Joyce
https://codepen.io/joycehuang/pen/LYQeeyE?editors=0111
-->
<!-- 24. Murmurline#6969
https://codepen.io/murmurline/pen/ExQoGdY
-->
<!-- 25. Arista
https://codepen.io/arista-hsieh/pen/yLvpWMm
-->
<!-- 26. Charlotte Lee
https://codepen.io/charlotte-lee/pen/dyddPVo?editors=0012
-->
<!-- 27. Lina Chen
https://codepen.io/LinaChen/pen/NWyyPpv
-->
<!-- 28. Pearlie#3536
https://codepen.io/PPcode/pen/MWQQgog
-->
<!-- 29. Peng
https://codepen.io/peng-027/pen/xxYPygd
-->
<!-- 30. 白狐
Codepen:https://codepen.io/baihu7851/pen/ZErRmyg
-->
<!-- 31. 小金#3256
codepen: https://codepen.io/AmoGH357/pen/qBxJxQJ
-->
<!-- 31. andersonshen#4675
codepen: https://codepen.io/luxyenni-the-bold/pen/RwQvrZa
-->
<!-- 32. WeiKai#1867
Codepen: https://codepen.io/beginneraboutlife116/pen/ZErNrWo
-->
<!-- 33. Claire#2116
codepen:https://codepen.io/claire-chang-the-bashful/pen/RwMxoKz -->
<!-- 35: huch09#1426
codepen: https://codepen.io/subarashii-huch09/pen/mdxqZQq?editors=1112 -->
<!-- 36. Neuf#3083
codepen: https://codepen.io/yifanneuf/pen/XWEvBjd?editors=1111 -->