Last active
December 16, 2019 04:34
-
-
Save DonerKebab/01f9b4359d5c7e9637490bfc269fb50a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const employeeList = [ | |
{ | |
id: 1, | |
name: "kien", | |
department: "GRC", | |
age: 40 | |
}, | |
{ | |
id: 2, | |
name: "huyen", | |
department: "GRC", | |
age: 18 | |
}, | |
{ | |
id: 3, | |
name: "hue", | |
department: "du3", | |
age: 22 | |
}, | |
{ | |
id: 4, | |
name: "bao", | |
department: "SA", | |
age: 38 | |
}, | |
{ | |
id: 5, | |
name: "hieu", | |
department: "SA", | |
age: 32 | |
}, | |
{ | |
id: 6, | |
name: "thanh", | |
department: "PMO", | |
age: 30 | |
}, | |
{ | |
id: 7, | |
name: "giang", | |
department: "PMO", | |
age: 26 | |
} | |
] | |
Cho trước mảng nhân viên như trên, yêu câu thực hiện những công việc như sau: | |
- Chia nhân viên thành các mảng: pmo, sa, grc. | |
- Sắp xếp danh sách theo thứ tự tuổi nhỏ -> lớn. | |
- Chuân hoá tên của nhân viên: viết hoa kí tự đầu tiên, ví dụ: kien -> Kien | |
- Hiển thị danh sách dưới dạng table: 3 table ứng với mỗi department. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment