8000 map a new array that pulls out data listed under title in the passed … · rhawkenson/javascript-exercises@c8840d4 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit c8840d4

Browse files
committed
map a new array that pulls out data listed under title in the passed array
1 parent eb4f57f commit c8840d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

getTheTitles/getTheTitles.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
const getTheTitles = function() {
2-
1+
const getTheTitles = function(bookArr) {
2+
let newArr = bookArr.map(books => books.title);
3+
return newArr;
34
}
45

56
module.exports = getTheTitles;
7+
8+
// jasmine getTheTitles.spec.js

0 commit comments

Comments
 (0)
0