Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active October 28, 2021 10:07
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 McLarenCollege/5d46ee37e3cbf47b8b492dd1cf9f26a0 to your computer and use it in GitHub Desktop.
Save McLarenCollege/5d46ee37e3cbf47b8b492dd1cf9f26a0 to your computer and use it in GitHub Desktop.
Exercise : Movies Object Diagram
let bollyWoodMovies = ['Kai Po Che', 'Dangal', '3 Idiots', ['Ashoka', 'Swades']];
let hollywood = 'bollywood';
let movies = {
'hollywood': ['Interstellar', 'Black Panther', {
comedy: {
'action': ['Night at the Museum', 'Meet the parents', 'Tropic Thunder'],
'romantic': ['The Fault in Our Stars', 'UP', 'Titanic']
},
rating: [7.2, 9, 8.3, 5, 7]
}, 'Avengers', 'Zero Dark Thirty', 'top'],
'bollywood': [
{
top10: [bollyWoodMovies[0], bollyWoodMovies[3], 'Gully Boy']
}
],
others: ['Bahubali', 'Robot'],
}
//Draw the object diagram for the above variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment