Created
February 18, 2023 07:24
-
-
Save schesnowitz/16fee2df214b83933ad1fdd57876f448 to your computer and use it in GitHub Desktop.
Objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let library = [ | |
{ | |
title: "Shithouse", | |
author: "Some Guy", | |
status: { | |
own: true, | |
reading: false, | |
read: false | |
} | |
}, | |
{ | |
title: "Just a book title", | |
author: "John Doe", | |
status: { | |
own: true, | |
reading: false, | |
read: false | |
} | |
}, | |
{ | |
title: "My name is Jane Doe", | |
author: "Jane Doe", | |
status: { | |
own: true, | |
reading: false, | |
read: false | |
} | |
} | |
] | |
library[0].status.read | |
library[1].status.read | |
library[2].status.read | |
const {title: title} = library[0]; | |
console.log(title); | |
const libraryJSON = JSON.stringify(library); | |
console.log(libraryJSON); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment