-
Notifications
You must be signed in to change notification settings - Fork 549
Closed
Description
问题:我在看到04 - Array Cardio Day 1/index-SOYAINE.html文件第105行时,发现此处的people参数并没有passed与year,
而在同一文件夹的index-FINISHED.html文件中,此处people文件的位置显示的是inventors(处于第65行)
比较代码:
index-SOYAINE.html:
// 5. Sort the inventors by years lived、
// 按照他们在世的岁数进行排序
const oldest = people.sort((a, b) => {
const last = a.passed - a.year;
const next = b.passed - b.year;
return (next < last) ? -1 : 1;
});
console.table(oldest);
index-FINISHED.html:
// 5. Sort the inventors by years lived
const oldest = inventors.sort(function(a, b) {
const lastInventor = a.passed - a.year;
const nextInventor = b.passed - b.year;
return lastInventor > nextInventor ? -1 : 1;
});
console.table(oldest);
Metadata
Metadata
Assignees
Labels
No labels