Skip to content

Instantly share code, notes, and snippets.

@JonathanMatthey
Created April 12, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanMatthey/5927ec14c87c5988f4b72b501a036b95 to your computer and use it in GitHub Desktop.
Save JonathanMatthey/5927ec14c87c5988f4b72b501a036b95 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<title>Objects Ex 2</title>
<script>
var library = [
{
author: 'Bill Gates',
title: 'The Road Ahead',
readingStatus: true
},
{
author: 'Steve Jobs',
title: 'Walter Isaacson',
readingStatus: true
},
{
author: 'Suzanne Collins',
title: 'Mockingjay: The Final Book of The Hunger Games',
readingStatus: false
}];
// Print all the book titles using a for in loop
// print all the book titles with readingStatus == true ( using for + if )
// updated Steve Jobs to Wozniak
// add a new object book called "The Grapes of Wrath" written by "John Steinbeck" with readingStatus = to true
// delete bill gates' book
</script>
</head>
<body>
Open Inspector > Console to see your results
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment