Skip to content

Instantly share code, notes, and snippets.

@appoll
Created June 7, 2021 16:31
Show Gist options
  • Save appoll/2ca63b2a026ba518deaff96c4130eecc to your computer and use it in GitHub Desktop.
Save appoll/2ca63b2a026ba518deaff96c4130eecc to your computer and use it in GitHub Desktop.
let b1 = {
title: "Gone with the wind",
price: 30,
currency: "EUR"
}
let b2 = {
title: "The godfather",
price: 40,
currency: "USD"
}
let books = [b1, b2];
console.log(books[0].title)
// E0. You are given an array with 2 book objects:
// 0.0 Add another property to each book, which is an object:
// author {firstName: "..."}
// 0.1 Add another book to the array of objects
// 0.2 Print the name of the author of the first book in the array
// 0.3 Print the name of the author of the last book in the array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment