6.1
This commit is contained in:
@@ -25,18 +25,18 @@ const render = (listItems) => {
|
|||||||
|
|
||||||
// Exercise helpers
|
// Exercise helpers
|
||||||
|
|
||||||
const peopleToString = (people) => {
|
|
||||||
return people.map((p) => `${p.name} ${p.last} (${p.age})`);
|
|
||||||
};
|
|
||||||
|
|
||||||
const peopleToListItems = (strings) => strings.map((str) => `<li>${str}</li>`);
|
|
||||||
|
|
||||||
const compareByName = (a, b) => a.name.localeCompare(b.name);
|
const compareByName = (a, b) => a.name.localeCompare(b.name);
|
||||||
const compareByLast = (a, b) => a.last.localeCompare(b.last);
|
const compareByLast = (a, b) => a.last.localeCompare(b.last);
|
||||||
const compareByAge = (a, b) => a.age - b.age;
|
const compareByAge = (a, b) => a.age - b.age;
|
||||||
|
|
||||||
const sortPeopleBy = /* ... PLACEHOLDER ... */ () => {};
|
const sortPeopleBy = /* ... PLACEHOLDER ... */ () => {};
|
||||||
|
|
||||||
|
const peopleToString = (people) => {
|
||||||
|
return 'PLACEHOLDER';
|
||||||
|
};
|
||||||
|
|
||||||
|
const peopleToListItems = (strings) => 'PLACEHOLDER';
|
||||||
|
|
||||||
// Main
|
// Main
|
||||||
|
|
||||||
const byname = /* ... PLACEHOLDER ... */ undefined;
|
const byname = /* ... PLACEHOLDER ... */ undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user