{"id":40511,"student_id":119,"content":"/*****************************************************\n 練習一\n*****************************************************/\nvar arr = [3, 6, 2, 8, 1, 5, 0, 7, 9, 4];\n\nconsole.log('排序後:' + arr);\narr.sort(function (a, b) {\n return b - a;\n});\nconsole.log('排序前:' + arr);\n\n\n/*****************************************************\n 練習二\n*****************************************************/\n// 目標:將年紀從小排到大並印出\nvar students = [\n { name: '大衛', age: 24 },\n { name: '莉莉', age: 17 },\n { name: '艾蓮', age: 18 },\n { name: '阿伯', age: 30 },\n { name: '威廉', age: 23 },\n { name: '凱文', age: 15 },\n { name: '朵莉絲', age: 22 }\n];\narr = students;\narr.sort(function (a, b) {\n return a.age - b.age;\n});\n\n// 印出完整物件\nconsole.log('排序後:' + JSON.stringify(arr, null, 4));","created_at":"2018-09-01T11:00:27.500+08:00","updated_at":"2019-10-11T09:41:55.118+08:00","name":"內建排序練習 副本","language":"javascript","screenshot":{"url":"https://cdn5.koding.school/uploads/project/screenshot/40511/fd1ac05835b665cf0d7e3c5532c7c2d7.jpg"},"parent_id":31717,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":74,"hashid":"9ygsrgkn","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":713902,"file_name":"1.wav","project_id":40511,"asset_id":10,"created_at":"2018-09-01T11:00:27.507+08:00","updated_at":"2018-09-01T11:00:27.507+08:00"},{"id":713903,"file_name":"0.wav","project_id":40511,"asset_id":9,"created_at":"2018-09-01T11:00:27.509+08:00","updated_at":"2018-09-01T11:00:27.509+08:00"},{"id":713904,"file_name":"2.png","project_id":40511,"asset_id":8,"created_at":"2018-09-01T11:00:27.511+08:00","updated_at":"2018-09-01T11:00:27.511+08:00"},{"id":713905,"file_name":"1.svg","project_id":40511,"asset_id":7,"created_at":"2018-09-01T11:00:27.513+08:00","updated_at":"2018-09-01T11:00:27.513+08:00"},{"id":713906,"file_name":"0.png","project_id":40511,"asset_id":6,"created_at":"2018-09-01T11:00:27.514+08:00","updated_at":"2018-09-01T11:00:27.514+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦