8000 Complete exercise 11 · josh-Fen/javascript-exercises@5309650 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5309650

Browse files
committed
Complete exercise 11
1 parent 8835816 commit 5309650

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

11_getTheTitles/getTheTitles.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
const getTheTitles = function() {
1+
const getTheTitles = function (arr) {
2+
// const titles = [];
3+
// arr.forEach(element => {
4+
// titles.push(element.title);
5+
// });
6+
// return titles;
27

8+
return arr.map(element => element.title);
39
};
410

511
// Do not edit below this line

0 commit comments

Comments
 (0)
0