You should print all names of books using the library variable. Perhaps the idea of writing an inner loop will help you.
For ... in for Objects
Book lover
Report a typo
Write a program in JavaScript
let library = {
books: {
"first": "Brothers Karamazov",
"second": "The Catcher in the Rye"
}
};
for (let object in library) {
//your code
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.