mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-07-18 06:03:22 +09:00
Merge branch 'master' of TOP/javascript-exercises
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Get the Titles!
|
||||
# GET THE TITLES!
|
||||
|
||||
You are given an array of objects that represent books with an author and a title that looks like this:
|
||||
|
||||
@@ -24,3 +24,4 @@ getTheTitles(books) // ['Book','Book2']
|
||||
## Hints
|
||||
|
||||
- You should use a built-in javascript method to do most of the work for you!
|
||||
<Paste>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const getTheTitles = function() {
|
||||
|
||||
var getTheTitles = function(array) {
|
||||
return array.map(book => book.title)
|
||||
}
|
||||
|
||||
module.exports = getTheTitles;
|
||||
module.exports = getTheTitles
|
||||
|
||||
Reference in New Issue
Block a user